From 69726b832b4ed1859d5c9e753c4437c98f5f2966 Mon Sep 17 00:00:00 2001 From: Enrico Forestieri Date: Sat, 29 Dec 2018 20:11:56 +0100 Subject: [PATCH] Fix bug #4269 Call gunzip with quoted filenames as they may contain spaces or other special characters. --- src/support/filetools.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/support/filetools.cpp b/src/support/filetools.cpp index 60bd72f905..028eedf91a 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) -- 2.39.5