]> git.lyx.org Git - features.git/blobdiff - lib/scripts/legacy_lyxpreview2ppm.py
Append ".exe" to the name of the searched-for program on Win32.
[features.git] / lib / scripts / legacy_lyxpreview2ppm.py
index 6105e4418e377d3f3a83efc8a0a05ad1613e2343..9b39354673a52da2dd5d34dc324f220af8b20687 100644 (file)
@@ -36,7 +36,11 @@ def error(message):
 def find_exe(candidates, path):
     for prog in candidates:
         for directory in path:
-            full_path = os.path.join(directory, prog)
+            if os.name == "nt":
+                full_path = os.path.join(directory, prog + ".exe")
+            else:
+                full_path = os.path.join(directory, prog)
+
             if os.access(full_path, os.X_OK):
                 return full_path