Closed Bug 367459 Opened 18 years ago Closed 18 years ago

jar: directory listings incorrectly list all files, including files in subdirectories

Categories

(Core :: Networking: JAR, defect)

x86
Linux
defect
Not set
normal

Tracking

()

VERIFIED FIXED

People

(Reporter: bzbarsky, Assigned: alfredkayser)

References

()

Details

(Keywords: regression)

Attachments

(2 files, 1 obsolete file)

BUILD: Current trunk build. STEPS TO REPRODUCE: 1) Pick any ZIP file with subdirectories with URL "URL". 2) Load jar:URL!/ I'll attach a testcase and point the URL field of the bug to it. EXPECTED RESULTS: See a listing of the _root_ directories in the ZIP file. ACTUAL RESULTS: See a listing of all files in the ZIP, with full paths. NOTES: As soon as I go down one directory, things look ok. This regressed when bug 337561 was checked in. Now that I've actually updated to a current trunk build, this has been causing me a _lot_ of pain recently -- I often have to browse testcase ZIPs.
Attached file ZIP file
Blocks: 337561
Note that I think we should back out bug 337561 if we don't get traction on this for 1.9...
Flags: blocking1.9?
The fix is luckely very simple. All one needs to do is to remove the if(!*aDir) optimisation in constructing the filter for the item selection for the jar directory display. (note, it would be nice if both things could be possible: list only root items, and list all items, but that would require an extension to the jar: URI protocol). Anyway this patch is not really CVS (I have today no CVS access), but it is simple enough to be applied.
Attachment #252031 - Flags: review?(bzbarsky)
Attachment #252031 - Flags: superreview?(darin.moz)
Could someone create a unit test for this?
Flags: in-testsuite?
Summary: jar: directory listings broken → jar: directory listings incorrectly list all files, including files in subdirectories
Comment on attachment 252031 [details] [diff] [review] Patch to fix the 'root' filtering Looks reasonable. Thanks for the patch!
Attachment #252031 - Flags: superreview?(darin.moz)
Attachment #252031 - Flags: superreview+
Attachment #252031 - Flags: review?(bzbarsky)
Attachment #252031 - Flags: review+
Er... Except that patch doesn't apply to a current tree.
This is Alfred's patch, but created as a proper cvs diff off the trunk. I've also confirmed that Firefox builds OK with it applied using VC8.
Attachment #252031 - Attachment is obsolete: true
Attachment #252273 - Flags: superreview?(bzbarsky)
Attachment #252273 - Flags: review?(bzbarsky)
Attachment #252273 - Flags: superreview?(bzbarsky)
Attachment #252273 - Flags: superreview+
Attachment #252273 - Flags: review?(bzbarsky)
Attachment #252273 - Flags: review+
Awesome. Checked in.
Status: NEW → RESOLVED
Closed: 18 years ago
Flags: blocking1.9?
Resolution: --- → FIXED
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: