commit 69726b832b4ed1859d5c9e753c4437c98f5f2966
Author: Enrico Forestieri <[email protected]>
Date: Sat Dec 29 20:11:56 2018 +0100
Fix bug #4269
Call gunzip with quoted filenames as they may contain spaces or
other special characters.
---
src/support/filetools.cpp | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/support/filetools.cpp b/src/support/filetools.cpp
index 60bd72f..028eedf 100644
--- a/src/support/filetools.cpp
+++ b/src/support/filetools.cpp
@@ -933,9 +933,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)