Opened 17 years ago

Closed 17 years ago

#2034 closed bug (fixed)

Can't unpackage zip files with short filenames

Reported by: scottmc Owned by: korli
Priority: normal Milestone: R1/alpha1
Component: Applications/Expander Version: R1/pre-alpha1
Keywords: Cc: j_freeman
Blocked By: Blocking:
Platform: All

Description

Tried unzipping jam.zip won't go, but if you rename it to jam2.zip it will. So I tried a few other zip files and it seems 3 letters is no-go but 4 is fine.

Attachments (2)

zip-short-name.png (77.3 KB ) - added by scottmc 17 years ago.
ExpanderRules_Ticket2034.diff (741 bytes ) - added by n3s 17 years ago.
Problem was ExpanderRules::MatchingRule(..) which can return a false rule if the extension does not match (-1) and the extension-position is calculated as -1, too. Please review!

Download all attachments as: .zip

Change History (7)

by scottmc, 17 years ago

Attachment: zip-short-name.png added

comment:1 by axeld, 17 years ago

Component: - GeneralApplications/Expander
Milestone: R1R1/alpha1
Owner: changed from axeld to korli

Good catch!

comment:2 by j_freeman, 17 years ago

Cc: j_freeman added

by n3s, 17 years ago

Problem was ExpanderRules::MatchingRule(..) which can return a false rule if the extension does not match (-1) and the extension-position is calculated as -1, too. Please review!

comment:3 by emitrax, 17 years ago

While I can't say anything about the patch, I think Expander shouldn't depends totally on the naming (extension). It'd be nice to have something that behaves like "file" and figure out the type of file, then expand it with the appropriate method. Of course though, extension should have the priority.

comment:4 by n3s, 17 years ago

Well, Expander actually checks for matching MIME-types. The (additional) check for the file-extension was broken though.

comment:5 by korli, 17 years ago

Resolution: fixed
Status: newclosed

Fixed in hrev24930

Note: See TracTickets for help on using tickets.