After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 773935 - msiextract skips over some files, outputs blank lines
msiextract skips over some files, outputs blank lines
Status: RESOLVED FIXED
Product: msitools
Classification: Other
Component: general
0.95
Other Linux
: Normal critical
: 1.0
Assigned To: msitools maintainer(s)
msitools maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2016-11-04 10:07 UTC by alt.j2-4o4s2yon
Modified: 2016-11-19 12:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
msiextract: fix extracting to SourceDir (1.25 KB, patch)
2016-11-19 12:34 UTC, Marc-Andre Lureau
committed Details | Review

Description alt.j2-4o4s2yon 2016-11-04 10:07:22 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)
Comment 1 alt.j2-4o4s2yon 2016-11-04 10:27:08 UTC
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).
Comment 2 alt.j2-4o4s2yon 2016-11-18 23:21:56 UTC
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.
Comment 3 Marc-Andre Lureau 2016-11-19 12:34:36 UTC
The following fix has been pushed:
47eb95b msiextract: fix extracting to SourceDir
Comment 4 Marc-Andre Lureau 2016-11-19 12:34:44 UTC
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>