nsStdURL::DirFile() introduces duplicate slash before filename

VERIFIED FIXED in M11

Status

()

Core
Networking
P3
normal
VERIFIED FIXED
19 years ago
19 years ago

People

(Reporter: Chris Waterson, Assigned: Gagan)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

19 years ago
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.

Updated

19 years ago
Blocks: 13449
Target Milestone: M11

Comment 1

19 years ago
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 ...

Comment 2

19 years ago
I checked in the fix myself ...
(Assignee)

Updated

19 years ago
Status: NEW → RESOLVED
Last Resolved: 19 years ago
Resolution: --- → FIXED
(Assignee)

Comment 3

19 years ago
thanks Andreas.

Comment 4

19 years ago
Bulk move of all Necko (to be deleted component) bugs to new Networking

component.

Comment 5

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