GNOME Bugzilla – Bug 773935
msiextract skips over some files, outputs blank lines
Last modified: 2016-11-19 12:34:44 UTC
trying to extract this msi here https://0x0.st/2KW.msi (warning: temporary storage, file will expire in a month, and please dont attach it here since it's content is private-ish). msiextract 0.95, extracts only some of the files and outputs a lot of empty lines. i suppose whenever it outputs an empty line, that is when one of the files got lost. additionally msiextract creates a bogus directory tree that is equivalent to the one it was run under. so if you run `msiextract 2KW.msi` in /tmp/foo/bar, it creates another tmp/foo/bar under that location (empty folder), yielding /tmp/foo/bar/tmp/foo/bar. here are some of the filenames in the msi that msiextract fails to extract: StartApp.exe Logo.ico Interface.dll tested on alpine linux x86_64 (compiled from source with libgsf 1.4.40 and libgcab 0.7)
here's a new discovery i just made: the files that msiextract fails to extract are all in the root tree. the files in subdirectories are all there. so missing are the 8 files in the root dir, and we get 7 blank lines printed plus one bogus directory tree created. oh, actually /tmp/foo/bar/tmp/foo/bar is not a directory, its one of the missing files, just at the wrong place and with the wrong filename (plus that filename didnt get printed out when extracting).
you have 2 weeks left until the msi download link will expire. assuming you care about your software product and want to improve it. if not just close this as WONTFIX so i can save my time looking into here every day.
The following fix has been pushed: 47eb95b msiextract: fix extracting to SourceDir
Created attachment 340300 [details] [review] msiextract: fix extracting to SourceDir A component extracting directly to TARGETDIR/SourceDir location ended up with an invalid/empty name. SourceDir is actually the root of extaction, so return an empty folder in get_directory_name(). Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=773935 Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>