Closed
Bug 77758
Opened 24 years ago
Closed 23 years ago
[Mac] Can't load files with slashes in filename into browser
Categories
(Core :: DOM: Copy & Paste and Drag & Drop, defect, P3)
Tracking
()
People
(Reporter: mikepinkerton, Assigned: jag+mozilla)
References
Details
(Keywords: platform-parity, regression)
- create an html file on the desktop called "4/23 results"
- drag it into navigator
expected:
- page should load
actual:
- nada
if you remove the '/' in the filename, the file can be loaded.
Reporter | ||
Updated•24 years ago
|
Reporter | ||
Comment 1•24 years ago
|
||
this doesn't work with files opened from the "open" dialog either, it's not just
drag/drop.
i'll file another bug that the file has to have an extension in order for it to
be seen by the dialog.
Summary: Can't drag files with slashes in filename into browser → Can't load files with slashes in filename into browser
Comment 3•24 years ago
|
||
Buy me a mac and I will.
Comment 4•24 years ago
|
||
I think some one should just buy Blake a mac ;-)
Updated•24 years ago
|
Comment 5•23 years ago
|
||
nav triage: not an rtm stopper.
Target Milestone: mozilla0.9.2 → mozilla0.9.3
Updated•23 years ago
|
Keywords: mozilla0.9.2
Updated•23 years ago
|
Summary: Can't load files with slashes in filename into browser → [Mac] Can't load files with slashes in filename into browser
So I've found out half of the problem. nsLocalFile::GetURL blindly converts '/'
into ':' and ':' into '/', reason being that ':' is the directory seperator
character on MacOS and '/' being the directory seperator for unix and URL's, so
we're trying to convert from platform specific to url form. Problem is that '/'
is a valid filename/directory name character, and swapping it for a ':' confuses
MacOS even more.
Everyone swears this was working, but I think everyone just remembers us fixing
this problem in 4.x many times over.
At any rate, I hacked a MacEscape() routine to encode the '/' before swapping
'/' and ':', and then the file url looks good. The problem then is that the
backend code can't deal with the escaped '/', so it looks like I need to find
the correct place to unencode the '/' character. Sheesh, nothing is ever simple
in this codebase.
At any rate, I'm pretty sure that I'll cause some regressions with this, so I
don't think we should take this for 0.9.3. And as Pinkerton said, we've foisted
this bug on our users this long, what's another milestone between friends.
Pushing out to mozilla0.9.4
Target Milestone: mozilla0.9.3 → mozilla0.9.4
Comment 8•23 years ago
|
||
nav triage team: moving to 0.9.5
Target Milestone: mozilla0.9.4 → mozilla0.9.5
Comment 9•23 years ago
|
||
Mass-moving lower-priority 0.9.5 bugs off to 0.9.6 to make way for remaining
0.9.4/eMojo bugs, and MachV planning, performance and feature work. If you
disagree with any of these targets, please let me know.
Target Milestone: mozilla0.9.5 → mozilla0.9.6
Comment 10•23 years ago
|
||
Given my current set of tasks, I won't be able to get to this for 0.9.6, pushing
out to mozilla0.9.8
Status: NEW → ASSIGNED
Target Milestone: mozilla0.9.6 → mozilla0.9.8
Comment 11•23 years ago
|
||
> So I've found out half of the problem. nsLocalFile::GetURL blindly converts '/'
This isn't the problem. The GetURL/SetURL methods of nsIFile give correct
round-trip conversion. What is probably going on is that an
nsFileSpec/nsFilePath is being used somewhere along the line. Conversions
between files and URLs between nsIFile and nsFileSpec are not round-trip. I
discovered this a long time ago when the chrome registry had this problem. Using
nsIFile and not mixing with nsFileSpec fixed it.
Comment 12•23 years ago
|
||
->jag
Assignee: pchen → jaggernaut
Status: ASSIGNED → NEW
Target Milestone: mozilla0.9.8 → ---
Comment 13•23 years ago
|
||
Dup.
*** This bug has been marked as a duplicate of 58533 ***
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•