Closed Bug 14132 Opened 25 years ago Closed 25 years ago

nsStdURL::DirFile() introduces duplicate slash before filename

Categories

(Core :: Networking, defect, P3)

defect

Tracking

()

VERIFIED FIXED

People

(Reporter: waterson, Assigned: gagan)

References

Details

All calls to nsStdURL::DirFile() are introducing an extra slash immediately
before the leaf file name; e.g., "/d|/foo/bar//baz.html" on Win32.

To reproduce the problem,

1. Set a breakpoint in nsFileChannel::Init(), around line 90:

    aURL->DirFile(getter_Copies(fileString));

2. Observe that fileString always has a double-slash immediately before the
leaf file name.

FWIW, this bug was introduced in r1.20 of nsStdURL.cpp. It was causing Mac to
crash on startup, but I fixed nsFileSpec so as not to suck as bigly.
Blocks: 13449
Target Milestone: M11
I just posted a fix to the builds group. I missed DirFile in cleaning up the /
usage. Just remove lines 1043/1044 from nsStdURL.cpp:

if (mDirectory[1])
    temp += '/';

Sorry for the mess ...
I checked in the fix myself ...
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
thanks Andreas.
Bulk move of all Necko (to be deleted component) bugs to new Networking

component.
marking verified per engineers comments
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.