File | Open File - returns wrong file URL

VERIFIED DUPLICATE of bug 19174

Status

SeaMonkey
General
P3
minor
VERIFIED DUPLICATE of bug 19174
19 years ago
14 years ago

People

(Reporter: Tim Bornholtz, Assigned: Gagan)

Tracking

Trunk
x86
Windows 95

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

19 years ago
If I go to File->OpenFile and choose the file c:\Program
Files\Netscape\Seamonkey\res\arrow.gif the image displays correctly.  If I go to
Network Neighborhood and choose my own PC (named tjba) and navigate to the same
file I get the following text on the screen and no image is displayed.  The text
is: "file://%5|/xjba/c/Program%20Files/Netscape/Seamonkey/res/arrow.gif".
I do have full access to the file.  I have also tried opening other images on
network drives and get the same results.

BTW, I am currently using Build ID: 2000012520

Comment 1

19 years ago
This is a real problem. When trying it on windows 2000 I got two assertions from 
nsFileSpec.cpp.

###!!! ASSERTION: unexpected canonical path: 'mPath[1] == ':'', file j:\mozilla\
mozilla\xpcom\io\nsFileSpec.cpp, line 689
###!!! ASSERTION: No drive letter part!: 'original[2] == '|'', file j:\mozilla\m
ozilla\xpcom\io\nsFileSpec.cpp, line 607

The inString argument to nsFilePath::nsFilePath was 
"\\Fraggel\T2BLIDER\pic15.jpg"

I cc andreas.otte@primus-online.de as he seems to be the expert on parsing 
"addresses" but I'm not sure it's his code that's involved.
Status: UNCONFIRMED → NEW
Ever confirmed: true

Comment 2

19 years ago
Hey, this is a funny one. Normaly I would say that file-urls don't have a
hostname, but this is different. I guess the webshell is adding the file://
before the path, the nsNoAuthURLParser moves the whole string into the path and
then nsIFile chokes on it on windows because it does not start with a drivename.

I think the right thing to do here would be to handle this with a different kind
of uri (unc scheme maybe) that can have hosts and accesses the file over the
network.

Comment 3

19 years ago
Confirmed with the 2000-02-18-08-M14 nightly binary on WinNT, except that
nothing is showing in the URL bar at all. This affects all files, not just
image files.

The exact same sort of mangling of the URL was seen in bug 19174, "Canonify does
not handle UNC file paths", marked FIXED (step 6). Making this a DUP of 19174 
and REOPENing that bug.


*** This bug has been marked as a duplicate of 19174 ***
Status: NEW → RESOLVED
Last Resolved: 19 years ago
Resolution: --- → DUPLICATE
Summary: Unable to open image from UNC Path → Unable to open file from UNC Path

Updated

19 years ago
Keywords: verifyme

Comment 4

19 years ago
verified dupe of 19174
Status: RESOLVED → VERIFIED

Comment 5

17 years ago
-> file
-verifyme
Component: Networking → Networking: File

Updated

17 years ago
Keywords: verifyme

Comment 6

17 years ago
-> browser-general

Can someone put this in the correct component (whoever does this File dialog 
box...)
Summary: Unable to open file from UNC Path → File | Open File - returns wrong file URL

Updated

17 years ago
Component: Networking: File → Browser-General
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.