Call gunzip with quoted filenames as they may contain spaces or
other special characters.

(cherry picked from commit 69726b832b)
This commit is contained in:
Enrico Forestieri 2018-12-29 20:11:56 +01:00
parent 5d90934bf8
commit 41a8994da9

View File

@ -925,9 +925,9 @@ FileName const unzipFile(FileName const & zipped_file, string const & unzipped_f
unzippedFileName(zipped_file.toFilesystemEncoding()) :
unzipped_file);
// Run gunzip
string const command = "gunzip -c " +
zipped_file.toFilesystemEncoding() + " > " +
tempfile.toFilesystemEncoding();
string const command = "gunzip -c \"" +
zipped_file.toFilesystemEncoding() + "\" > \"" +
tempfile.toFilesystemEncoding() + "\"";
Systemcall one;
one.startscript(Systemcall::Wait, command);
// test that command was executed successfully (anon)