Opened 10 years ago

Closed 10 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: Jonathon Freeman
Blocked By: Blocking:
Has a Patch: no 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 10 years ago.
ExpanderRules_Ticket2034.diff (741 bytes) - added by n3s 10 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)

Changed 10 years ago by scottmc

Attachment: zip-short-name.png added

comment:1 Changed 10 years ago by axeld

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

Good catch!

comment:2 Changed 10 years ago by Jonathon Freeman

Cc: Jonathon Freeman added

Changed 10 years ago by n3s

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 Changed 10 years ago by emitrax

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 Changed 10 years ago by n3s

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

comment:5 Changed 10 years ago by korli

Resolution: fixed
Status: newclosed

Fixed in hrev24930

Note: See TracTickets for help on using tickets.