]> git.lyx.org Git - features.git/commitdiff
Fix bug #4269
authorEnrico Forestieri <forenr@lyx.org>
Sat, 29 Dec 2018 19:11:56 +0000 (20:11 +0100)
committerEnrico Forestieri <forenr@lyx.org>
Tue, 19 Mar 2019 20:22:14 +0000 (21:22 +0100)
Call gunzip with quoted filenames as they may contain spaces or
other special characters.

(cherry picked from commit 69726b832b4ed1859d5c9e753c4437c98f5f2966)

src/support/filetools.cpp

index c91e5c4194eee36c31cc9999e449e4dea99d278c..f2697f784b2cf90ea396e5596fe8643fbb40ff83 100644 (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)