]> git.lyx.org Git - lyx.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>
Sat, 29 Dec 2018 19:11:56 +0000 (20:11 +0100)
Call gunzip with quoted filenames as they may contain spaces or
other special characters.

src/support/filetools.cpp

index 60bd72f9054b5e6d9e3498ee2f8efcaa28159943..028eedf91aef95b6ccc56534dd173d911274660e 100644 (file)
@@ -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)