X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FFormat.cpp;h=bf3102653c37658c838c6e67704d33f4d936a07f;hb=858c12c6bb850b7ed7a708e3e66fd58ba6f06cb9;hp=e29cdee2ee5661390290a515b6bc1ac15a09a1a3;hpb=90b6920083acf8d271106fea81221ec8de39b4c1;p=lyx.git diff --git a/src/Format.cpp b/src/Format.cpp index e29cdee2ee..bf3102653c 100644 --- a/src/Format.cpp +++ b/src/Format.cpp @@ -705,8 +705,10 @@ bool Formats::view(Buffer const & buffer, FileName const & filename, if (!contains(command, token_from_format)) command += ' ' + token_from_format; - command = subst(command, token_from_format, quoteName(onlyFileName(filename.toFilesystemEncoding()))); - command = subst(command, token_path_format, quoteName(onlyPath(filename.toFilesystemEncoding()))); + command = subst(command, token_from_format, + quoteName(onlyFileName(filename.toFilesystemEncoding()), quote_shell_filename)); + command = subst(command, token_path_format, + quoteName(onlyPath(filename.toFilesystemEncoding()), quote_shell_filename)); command = subst(command, token_socket_format, quoteName(theServerSocket().address())); LYXERR(Debug::FILES, "Executing command: " << command); // FIXME UNICODE utf8 can be wrong for files @@ -773,8 +775,10 @@ bool Formats::edit(Buffer const & buffer, FileName const & filename, if (!contains(command, token_from_format)) command += ' ' + token_from_format; - command = subst(command, token_from_format, quoteName(filename.toFilesystemEncoding())); - command = subst(command, token_path_format, quoteName(onlyPath(filename.toFilesystemEncoding()))); + command = subst(command, token_from_format, + quoteName(filename.toFilesystemEncoding(), quote_shell_filename)); + command = subst(command, token_path_format, + quoteName(onlyPath(filename.toFilesystemEncoding()), quote_shell_filename)); command = subst(command, token_socket_format, quoteName(theServerSocket().address())); LYXERR(Debug::FILES, "Executing command: " << command); // FIXME UNICODE utf8 can be wrong for files