Closed
Bug 530064
Opened 15 years ago
Closed 14 years ago
Firefox can't open local files (from Finder) with space character(s) in full path of file(space in file name or directory name of file system)
Categories
(Toolkit :: Startup and Profile System, defect)
Tracking
()
RESOLVED
FIXED
mozilla1.9.3a1
People
(Reporter: RHouse2, Assigned: stefanh)
References
Details
(Keywords: regression, relnote)
Attachments
(3 files)
29.34 KB,
text/html
|
Details | |
9.28 KB,
application/x-zip-compressed
|
Details | |
956 bytes,
patch
|
jaas
:
review+
beltzner
:
approval1.9.2.2+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2b3) Gecko/20091115 Firefox/3.6b3 Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2b3) Gecko/20091115 Firefox/3.6b3 No page is displayed. No errors are shown. Nothing happens. Worked in FF 3.5. Setting "Open With" browser to Safari 4 and double clicking opens OK in Safari. Dragging file to FF3.6b3 opens file OK. Reproducible: Always Steps to Reproduce: 1. Double click on any .htm or .html file. 2. 3. Actual Results: Nothing is displayed in Firefox Expected Results: Page displayed.
Comment 1•15 years ago
|
||
Open FF 3.6b3 and Tools -> Options -> Advanced -> General tab. Check that Firefox is set as your default browser. http://support.mozilla.com/en-US/kb/How+to+make+Firefox+the+default+browser?s=default
FF 3.6b3 is the default browser. If I change that to Safari, the html files open OK.
Comment 3•15 years ago
|
||
Does the file open correctly in Firefox if you use open with and select Firefox? <quote source=http://www.macworld.com/article/52935/2006/09/openwith.html> Highlight the file, press Command-I, click the triangle next to the Open with section, then click the pop-up and choose the application you’d like to use to open the file </quote>
Upgraded to FF 3.6b4. If I set the default "Open with" in the file info panel to any other app (Safari, Textmate, TextEdit) then double clicking on an html file opens it in that app. Settting it to FF 3.6b, nothing happens when the file is double clicked. If I downgrade to FF3.5.4 then it opens OK when double clicked.
Comment 5•15 years ago
|
||
If you actually click on the file and choose open with Firefox does it open? In comment 4 you appear to have changed the system wide open with settings. In comment 3 I was looking to try and force that particular html file to open in FF.
Comment 6•15 years ago
|
||
The same bug in 3.6b4. FF is the default browser. Setting for the htm-file is "open with FF". Double-click on the icon (file) opens FF, but only displays a blank page. Opening the htm-file with cmd-O in FF works fine.
Comment 7•15 years ago
|
||
Can you attach the file you are trying to open? If not, let me know and I will create a sample that we both can try.
Comment 8•15 years ago
|
||
In FF 3.6b4 OS X 10.6.2, clicking on bookmark.html file opens it in FF. Clicking on Photoshop htm file, it doesn't open. Dragging into FF opens it OK.
Comment 10•15 years ago
|
||
I am not seeing an issue on my setup. Being that the .html opens and the .htm doesn't I am leaning towards it being an OS config issue. Have you tried the instructions in comment 3 (select file, command I, choose open with and select Firefox).
Reporter | ||
Comment 11•15 years ago
|
||
Yes I have followed the instructions in comment 3 a number of times with FF and into other apps and back. Still the same result. The icon reacts visually (expands and contracts) when clicked, as though it is going to open but nothing happens after that.
Comment 12•15 years ago
|
||
If you choose [File -> Open File] it opens correctly?
Reporter | ||
Comment 13•15 years ago
|
||
File->Open File exhibits the same behaviour. File doesn't open, but window focus changes to FF.
Assignee | ||
Comment 14•14 years ago
|
||
There are 2 scenarios and you will probably get different results for these: i) Opening a file when the application is not running ii) Opening a file when the application is running Can you try the following (both scenario i) and ii) ) with the latest Firefox 3.6b5 (or the latest 1.9.2 build)? A) 1) In Finder, navigate to a .html file (locally saved/created) 2) Right-click on the .html file and choose "Open with..." 3) Navigate to the Firefox 3.6b5 build and choose open B) (drag 3.6b5 to the Dock so you have the app icon in there) 1) In Finder, navigate to a .html file (locally saved/created) 2) Drag and drop the file to the 3.6b5 icon in the Dock What happens in i) resp. ii) when you do A) and B)?
Assignee | ||
Updated•14 years ago
|
Component: File Handling → Startup and Profile System
Product: Firefox → Toolkit
QA Contact: file.handling → startup
Version: unspecified → 1.9.2 Branch
Comment 15•14 years ago
|
||
i) A): opens FF, displays blank page i) B): opens FF, displays blank page ii) A): FF still displays a blank page ii) B): FF still displays a blank page FF 3.6b5, MacOS 10.6.2
Assignee | ||
Comment 16•14 years ago
|
||
OK, thanks. What are your startup preferences (General)? To launch a blank page?
Comment 17•14 years ago
|
||
Yes, FF starts with a blank page.
Reporter | ||
Comment 18•14 years ago
|
||
Tested with FF 3.6b5. My startup page is iGoogle. i) A): Opens FF, displays a blank (Untitled) page ii) A): Opens FF, displays a blank (Untitled) page i) B): FF window brought to the foreground if window is open on screen, no changes to previously display tab. If FF is running and window is not on screen, nothing appear to happen. ii) B): Same as i)
Comment 19•14 years ago
|
||
(In reply to comment #8) > German readme file for Adobe pse 6 File name is next? (with space, but 7bit ascii only?)? > Photoshop Elements 6 - Bitte lesen.htm What is full path of the file? Does "book marks.html" work? Is there any error message in Error Console?
Comment 20•14 years ago
|
||
"/Users/juela/Library/Application Support/Firefox/Profiles/default.gwc/bookmarks.html" doesn't work "/Users/juela/Desktop/Photoshop Elements 6 - Bitte lesen.htm" also doesn't work. Fehler: Warning: unrecognized command line flag -foreground Quelldatei: file:///Applications/Firefox.app/Contents/MacOS/components/nsBrowserContentHandler.js Zeile: 708 The same error message for both files ...
Comment 21•14 years ago
|
||
(In reply to comment #20) > "/Users/juela/Library/Application > Support/Firefox/Profiles/default.gwc/bookmarks.html" doesn't work > "/Users/juela/Desktop/Photoshop Elements 6 - Bitte lesen.htm" also doesn't > work. You stated like next in your comment #9. > Bookmarks file opens, Photoshop file doesn't > In FF 3.6b4 OS X 10.6.2, clicking on bookmark.html file opens it in FF. > Clicking on Photoshop htm file, it doesn't open. (snip) What is difference between "bookmarks.html in your comment #9" and "bookmarks.html in your comment #22"? Does your problem occur even when full path doesn't have space and contains only 7bit ascii which is valid as directory/file name character on Mac OS X?
Reporter | ||
Comment 22•14 years ago
|
||
Bingo! Its the space character in the file name! Take out the space and it opens OK. Put a space into a file that does open, and then it doesn't open.
Comment 23•14 years ago
|
||
Yes, that's it. I renamed "Photoshop Elements 6 - Bitte lesen.htm" to "readme.htm" and it works. Renamed it to "read me.htm" (with a space in the name) and it doesn't open. The same with "bookmarks.html" --> works and "book marks.html" --> doesn't work.
Comment 24•14 years ago
|
||
(In reply to comment #22) > Bingo! Its the space character in the file name! It's probably problem in registration of string for program invocation. (Example on MS Win) For .htm/.html : 'firefox.exe "%1"' is required in order to be torelant with space in path. But 'firefox.exe %1' is registered.
Assignee | ||
Comment 25•14 years ago
|
||
WADA, thanks for sorting this out. It doesn't work on trunk either, I tried opening a file with a space character in the file name with Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.3a1pre) Gecko/20100101 Minefield/3.7a1pre and the file doesn't open (loads start page instead).
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: blocking1.9.2?
Summary: Double clicking on .html file doesn't open it in Firefox 3.6b3. → Firefox can't open local files (from Finder) with space character(s) in file name.
Version: 1.9.2 Branch → Trunk
Assignee | ||
Comment 26•14 years ago
|
||
FYI, trying to open the local file "font weight.xhtml" (comment #14 ii) A) in my seamonkey trunk debug build fails with the following warning in the console: "2010-01-01 19.10.13 [0x0-0x2a02a].org.mozilla.seamonkey WARNING: NS_ENSURE_TRUE(aCFURL) failed: file /Users/Stefan/comm-trunk/mozilla/xpcom/io/nsLocalFileOSX.mm, line 1555 " If I re-name the file to "font-weight.xhtml", it opens fine.
Assignee | ||
Comment 27•14 years ago
|
||
(In reply to comment #25) > WADA, thanks for sorting this out. > > It doesn't work on trunk either, I tried opening a file with a space character > in the file name with Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; > rv:1.9.3a1pre) Gecko/20100101 Minefield/3.7a1pre and the file doesn't open > (loads start page instead). Slight correction: If Minefield isn't running, the start page opens. If Minefield is already running, nothing happens (apart from the already opened browser window getting focus)
Assignee | ||
Comment 28•14 years ago
|
||
MacApplicationDelegate.mm#156: - (BOOL)application:(NSApplication*)theApplication openFile:(NSString*)filename { NS_OBJC_BEGIN_TRY_ABORT_BLOCK_RETURN; // Take advantage of the existing "command line" code for Macs. nsMacCommandLine& cmdLine = nsMacCommandLine::GetMacCommandLine(); // We don't actually care about Mac filetypes in this context, just pass a placeholder. cmdLine.HandleOpenOneDoc((CFURLRef)[NSURL URLWithString:filename], 'abcd'); return YES; NS_OBJC_END_TRY_ABORT_BLOCK_RETURN(NO); } I don't know this code, but if "filename" contains a whitespace, I think "NSURL URLWithString:filename" will fail.
Comment 29•14 years ago
|
||
Don't think we can block on this at this time, though it's a pretty crappy regression. Is it 64-bit only? --> Firefox::System Integration, cc'ing josh, smontagu and mstange
Component: Startup and Profile System → Shell Integration
Flags: blocking1.9.2?
Keywords: regression,
relnote
Product: Toolkit → Firefox
QA Contact: startup → shell.integration
Whiteboard: [3.6.x]
Updated•14 years ago
|
Flags: blocking-firefox3.6-
Assignee | ||
Comment 30•14 years ago
|
||
(In reply to comment #29) >Is it 64-bit only? No, it's not.
Assignee | ||
Updated•14 years ago
|
Hardware: x86_64 → x86
Assignee | ||
Comment 31•14 years ago
|
||
This is really a toolkit issue, moving back to previous component.
blocking2.0: --- → ?
Component: Shell Integration → Startup and Profile System
Flags: blocking-firefox3.6-
Product: Firefox → Toolkit
QA Contact: shell.integration → startup
Comment 32•14 years ago
|
||
This change happened in rev 27148 by Josh Aas: optimize/modernize Mac OS X toolkit/xre code. b=486733 r=mstange sr=bsmedberg Diff: // Take advantage of the existing "command line" code for Macs. nsMacCommandLine& cmdLine = nsMacCommandLine::GetMacCommandLine(); // We don't actually care about Mac filetypes in this context, just pass a placeholder. - cmdLine.HandleOpenOneDoc(&ref, 'abcd'); + cmdLine.HandleOpenOneDoc((CFURLRef)[NSURL URLWithString:filename], 'abcd'); return YES; The commit is dated Thu Apr 09 2009, didn't we use this code in Firefox 3.5.x?
Comment 33•14 years ago
|
||
(In reply to comment #32) > This change happened in rev 27148 by Josh Aas: optimize/modernize Mac OS X > toolkit/xre code. b=486733 r=mstange sr=bsmedberg Thanks for narrowing that down. > The commit is dated Thu Apr 09 2009, didn't we use this code in Firefox 3.5.x? No, that isn't included in Firefox 3.5.x
Blocks: 486733
Comment 34•14 years ago
|
||
(In reply to comment #33) > > The commit is dated Thu Apr 09 2009, didn't we use this code in Firefox 3.5.x? > > No, that isn't included in Firefox 3.5.x That explains things :) I'm quoting from http://forums.macrumors.com/archive/index.php/t-544408.html: According to the NSURL documentation for +URLWithString: This method expects URLString to contain any necessary percent escape codes. Note that ‘%’ escapes are translated via UTF-8. Try using the NSString method -stringByAddingPercentEscapesUsingEncoding on the string before you pass it to a method expecting a URL. That method is expected to "Returns a representation of the receiver using a given encoding to determine the percent escapes necessary to convert the receiver into a legal URL string." (see http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/Reference/NSString.html#//apple_ref/occ/instm/NSString/stringByAddingPercentEscapesUsingEncoding:) I don't have commit rights on Mozilla, but more I don't have much experience with this product. If anyone can add a stringByAddingPercentEscapesUsingEncoding it would be helpful.
Assignee | ||
Comment 35•14 years ago
|
||
Note that I'm not really a obj-c person so I'm a bit scare touching this code ;-)
Attachment #422011 -
Flags: review?(joshmoz)
Attachment #422011 -
Flags: review?(joshmoz) → review+
Attachment #422011 -
Flags: approval1.9.2.1?
Assignee | ||
Comment 36•14 years ago
|
||
Note to self (I'll land this tomorrow): Fix the comment on check-in (add a ".").
Assignee: nobody → stefanh
Target Milestone: --- → mozilla1.9.3a1
Assignee | ||
Comment 37•14 years ago
|
||
Pushed with comment ending with ".": http://hg.mozilla.org/mozilla-central/rev/74021e56c58d
Status: NEW → RESOLVED
blocking2.0: ? → ---
Closed: 14 years ago
Resolution: --- → FIXED
Comment 38•14 years ago
|
||
Please see my comment at bug 541498 which appears to be a dupe of this one.
Comment 44•14 years ago
|
||
Comment on attachment 422011 [details] [diff] [review] Ensure URLWithString gets a correct URL a1922=beltzner, please land
Attachment #422011 -
Flags: approval1.9.2.2? → approval1.9.2.2+
Updated•14 years ago
|
blocking1.9.2: --- → needed
Whiteboard: [3.6.x]
Assignee | ||
Comment 45•14 years ago
|
||
http://hg.mozilla.org/releases/mozilla-1.9.2/rev/14fd499129bf (with "." after comment)
Assignee | ||
Updated•14 years ago
|
status1.9.2:
--- → .2-fixed
Comment 46•14 years ago
|
||
(In reply to comment #45) > http://hg.mozilla.org/releases/mozilla-1.9.2/rev/14fd499129bf (with "." after > comment) Thanks for pushing that onto the 1.9.2 trunk. I have a MacOS X 10.5, I'll try the nightly to check. Is this correction expected to be in Firefox 3.6.1? Cheers S. Ali Tokmen http://ali.tokmen.com/
Assignee | ||
Comment 47•14 years ago
|
||
(In reply to comment #46) > Is this correction expected to be in Firefox 3.6.1? Yes (probably be called 3.6.2 in order to sync with the platform, though)
Comment 52•14 years ago
|
||
Adding "full path" to bug summary to avoid confusion in other bugs. Please roll back if it's wrong.
Summary: Firefox can't open local files (from Finder) with space character(s) in file name. → Firefox can't open local files (from Finder) with space character(s) in full path of file(space in file name or directory name of file system)
Comment 55•14 years ago
|
||
Very weird. This sticky http://forums.mozillazine.org/viewtopic.php?f=38&t=1725075 describes some behavior on Mac that I personally verified before publishing the sticky. As of now it works using File -> Open and Dropping a file on FF window with spaces in both/either the enclosing folder and/or the file name. It still does not work by double clicking the offending file. What gives????? I'm still using FF3.6 (Gecko/20100115) and according to the bug report this is fixed in 3.6.2 not 3.6.
Comment 56•14 years ago
|
||
(In reply to comment #55) > As of now it works using File -> Open and Dropping a file on FF window with > spaces in both/either the enclosing folder and/or the file name. By "File -> Open", I assume you mean the *Firefox* "File" menu. If so, then no surprise there... the two techniques you list to open a file have ALWAYS worked in FF 3.6.(0), EVEN IF the file/pathname contains embedded space(s). It is ONLY when you attempt to send such a file/pathname to FF 3.6.(0) through the Mac OS Finder that this bug manifests. > It still does not work by double clicking the offending file. Precisely. That IS the bug. Also "File -> Open" from the Mac OS Finder, either menubar or contextual. Those fail, too.
Comment 58•14 years ago
|
||
A user on twitter is saying that this isn't fixed in 3.6.6. This patch was included in 3.6.x, right? See: http://twitter.com/jameswillweb/status/18574206833
Comment 59•14 years ago
|
||
Well, I haven't tested all the possible manifestations of this bug, so it is *possible* that he has found some esoteric aspect of it that wasn't fixed. But the obvious effects of this bug, which I described in Comment #56, *were* resolved... as of 3.6.2, IIRC. Else, *I* would still be complaining, too! ;-) Also, I'm quite certain I would have noticed if this bug had re-appeared in 3.6.6, since I exercise the "spaces in pathnames" feature on a regular basis. However, I decided to verify just to be sure... Yes, "spaces in pathnames" still works for me in 3.6.6. Guess you'll just have to ask him what he meant by that tweet...
Comment 60•14 years ago
|
||
OK... There may indeed be a problem. But it's *not* with embedded spaces. That seems to work properly, at least as far as I can determine. But certain characters that are valid in Mac OS pathnames are still not being escaped properly, causing open failures when the offending file is double-clicked in Finder. I found two such characters with a quick search... '?' and ';'. So valid Mac OS filenames like 'show?bug.html' and 'show;bug.html' still cannot be opened in FF 3.6.6 by double-clicking on them. In both cases, FF apparently tries to open the truncated pathname "/Users/SomeUserName/SomeFolder/show" and gets a "File not found" error. There may be other such problematic characters, and someone probably should search for them systematically. However, shouldn't this be reported as a new bug rather continuing to beat up on an old, dead one?
Comment 61•14 years ago
|
||
Comment #60 is not correct. This is supported by this http://www.portfoliofaq.com/pfaq/FAQ00352.htm Titled Mac and Windows OS File/Folder naming rules 1. Illegal filename characters, (e.g. : or ?). (All OSs). 2. Deprecated filename characters (; and ,). (All OSs). ... 9. Deprecated characters in path to file - same issue as #2 but for path. (All OSs). The '?' character is illegal on Win and Mac and the ';' character is deprecated on Win and Mac for filenames and path names. .
Comment 62•14 years ago
|
||
Comment #61 is not correct; Comment #60 is correct. '?' is perfectly valid in OSX file names. The linked document contains a third party recommendation for cross-platform file naming, but its suggestions do not constrain contented OSX-only users.
Comment 63•14 years ago
|
||
More to the point... Safari can open HTML files with '?' and ';' in the filename. And, if I change the extension from '.html' to '.txt', then I can double click on them and they *will* open in TextWrangler, my default app for text files. (I checked both of those things yesterday, just in case, before reporting this issue, but I didn't think I needed to include those observations here.) So it's clear that FF behaves *differently* in that regard than other Mac OS apps. Besides, if '?' actually *was* illegal, then Finder wouldn't let me *use* it in the filename in the first place. (It won't let me use ':' in a filename, for example, which *is* an illegal filename character in Mac OS.)
Comment 64•14 years ago
|
||
A couple more thoughts, then I'm going to stop bothering you folks... FF 3.6.6 *can* open files with filenames like 'show?bug.html'. Works if you use the FF 'File > Open File' menu item. Works if you drag-n-drop the file onto an open FF window. In both cases, the displayed URL is 'file:///Users/SomeUserName/SomeFolder/show%3Fbug.html'. Note how the '?' is escaped to '%3F'. FF 3.6.6 *cannot* open files with filenames like 'show?bug.html' if the Mac OS Finder is involved. FAILS if you double-click the file in Finder. FAILS if you use the Finder 'File > Open' menu item, either contextual or from the menu bar. In both cases, FF reports "File not found", and the displayed URL is 'file:///Users/SomeUserName/SomeFolder/show'. Note how the URL is truncated right where the '?' should appear. So it seems there are (at least) TWO distinct code pathways for converting Mac OS pathnames to URLs in FF 3.6.X. One of them works correctly in all cases that I've tested. The other one is BROKEN, at least for certain characters that are legal in Mac OS pathnames, but problematic in URLs if not properly escaped. Furthermore, remember that FF 3.5.X does *NOT* have this problem... ALL methods for opening a file work as expected. (I just tested that... AGAIN.) Seems to me, therefore, that this *IS* another, albeit more subtle, manifestation of the regression error described in Comment #33. In other words, this bug is STILL UNRESOLVED, at least in part, which is precisely what the original tweeter wrote.
Assignee | ||
Comment 65•14 years ago
|
||
As the description indicates, this bug is about space characters in file names/paths. If you think there are other issues that should be solved/discussed, please open a new bug.
Comment 66•14 years ago
|
||
Apparently it was reported (in May) as bug 568124 (at least the semicolon part of this).
Comment 67•14 years ago
|
||
(In reply to comment #61) > The '?' character is illegal on Win and Mac and the ';' character is deprecated > on Win and Mac for filenames and path names. Only two characters are disallowed in filenames in Mac OS X: null, and only one of ":" or "/" (depending on context, i.e., which acts as the file path separator -- which depends on whether you're using POSIX file paths or class Mac file paths); where one the latter two is allowed, the other is not, and where one of those occurs in a filename in a given context, the other is substituted in contexts where the first is not allowed.
Comment 68•14 years ago
|
||
(sorry, that should read "classic Mac file paths")
Comment 69•14 years ago
|
||
still not working, i have FF 3.6.11 and DW doesnt preview in FF.
Comment 70•11 years ago
|
||
It is very uncomfortable on filesystems with language-dependent paths, e.g. if Ubuntu is installed with Russian language selected as default, the path to desktop is defined explicitly as "~/Рабочий стол", not "~/Desktop". Sadly, it is version 22 and Firefox still can't handle files with spaces in path on GNU/Linux Ubuntu! Instead, it opens several tabs and tries to autocomplete the chunks of the filename as web addresses.
Comment 71•6 years ago
|
||
Its 2018 and Firefox still can't open html documents with spaces from the command line! This is Firefox 59.0.2+build1-0ubuntu0.17.10.1. $ cat >test\ page.html <<EOF <html><title>Test page</title><body>test page</body></html> EOF $ firefox ./test\ page.html # opens two tabs in new window, first is empty, second tries "www.page.html" $ firefox . # lists directory in new tab of existing window, click on "test page.html" works $ firefox test%20page.html # works
Assignee | ||
Comment 72•6 years ago
|
||
(In reply to Bert.Wesarg from comment #71) > Its 2018 and Firefox still can't open html documents with spaces from the > command line! This is Firefox 59.0.2+build1-0ubuntu0.17.10.1. If you have an issue on Linux, you should really file a separate bug - this is/was a mac-specific issue (you can see that looking at the "Platform" field) resolved 8 years ago.
You need to log in
before you can comment on or make changes to this bug.
Description
•