]> git.lyx.org Git - lyx.git/blobdiff - src/converter.C
reduce number of calls to LyXText::getFont
[lyx.git] / src / converter.C
index 1784d915cd4f4cfb4d53486774415879919f9c78..c8f47c4785d2251c19516a78daf4cc1e12267b70 100644 (file)
@@ -295,10 +295,13 @@ bool Converters::convert(Buffer const * buffer,
                        // if no special converter defined, then we take the
                        // default one from ImageMagic.
                        string const from_ext = formats.extension(from_format);
-                       string const command = "sh " +
-                               LibFileSearch("scripts", "convertDefault.sh") +
-                               ' ' + from_ext + ':' + from_file +
-                               ' ' + to_ext   + ':' + to_file;
+                       string const command =
+                               "sh " +
+                               QuoteName(LibFileSearch("scripts", "convertDefault.sh")) +
+                               ' ' +
+                               QuoteName(from_ext + ':' + from_file) +
+                               ' ' +
+                               QuoteName(to_ext + ':' + to_file);
                        lyxerr[Debug::FILES]
                                << "No converter defined! "
                                   "I use convertDefault.sh:\n\t"
@@ -409,6 +412,9 @@ bool Converters::convert(Buffer const * buffer,
                                                << "renaming file " << outfile
                                                << " to " << real_outfile
                                                << endl;
+                               // Finally, don't forget to tell any future
+                               // converters to use the renamed file...
+                               outfile = real_outfile;
                        }
 
                        if (!conv.parselog.empty()) {