commit ca921fd65082e560aadc8b6d4856f1c4359ead50
Author: Enrico Forestieri <[email protected]>
Date:   Wed Apr 29 16:20:27 2015 +0200

    Correctly indicate the failing converter
    
    If epstopdf fails, pdftocairo is not called but the warning points
    the finger to it. Also correctly indicate the failing file.

diff --git a/lib/scripts/legacy_lyxpreview2ppm.py 
b/lib/scripts/legacy_lyxpreview2ppm.py
index 86a8735..2519f75 100644
--- a/lib/scripts/legacy_lyxpreview2ppm.py
+++ b/lib/scripts/legacy_lyxpreview2ppm.py
@@ -462,7 +462,7 @@ def legacy_conversion_step3(latex_file, dpi, output_format, 
dvips_failed, skipMe
     else:
         # Model for calling the converter on each file
         if use_pdftocairo and epstopdf != None:
-            conv_call = '%s -png -transp -singlefile -r %d "%%s.pdf" "%s%%d"' \
+            conv_call = '%s -png -transp -singlefile -r %d "%%s" "%s%%d"' \
                         % (pdftocairo, resolution, latex_file_root)
         else:
             conv_call = '%s -dNOPAUSE -dBATCH -dSAFER -sDEVICE=%s ' \
@@ -482,10 +482,12 @@ def legacy_conversion_step3(latex_file, dpi, 
output_format, dvips_failed, skipMe
             i = i + 1
             progress("Processing page %s, file %s" % (i, file))
             if use_pdftocairo and epstopdf != None:
-                conv_name = "pdftocairo"
+                conv_name = "epstopdf"
                 conv_status, conv_stdout = run_command("%s --outfile=%s.pdf %s"
                                                        % (epstopdf, file, 
file))
                 if not conv_status:
+                    conv_name = "pdftocairo"
+                    file = file + ".pdf"
                     conv_status, conv_stdout = run_command(conv_call % (file, 
i))
             else:
                 conv_name = "ghostscript"

Reply via email to