Angus Leeming wrote:
> That is indeed a problem. We can't quote the first word.
> 
> I think that the thing to do here is to split the full path to the
> executable into "basename" and "dirname" parts, to add the "dirname" to
> the PATH environment variable (if it's not there already) and to execute
> the command as simply
>     gswin32c.exe foo bar "C:\Program Files\LyX\~\blabla.ps"
> 
> The attached patch seems to do the trick. Please test!

Actually, the executable is found only if it's in the PATH already. There's
no need for us to manipulate the PATH further.

Try this patch instead.

-- 
Angus
Index: lib/scripts/lyxpreview2ppm.py
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/scripts/Attic/lyxpreview2ppm.py,v
retrieving revision 1.1.2.7
diff -u -p -r1.1.2.7 lyxpreview2ppm.py
--- lib/scripts/lyxpreview2ppm.py	16 Jun 2005 13:15:11 -0000	1.1.2.7
+++ lib/scripts/lyxpreview2ppm.py	8 Dec 2005 00:13:02 -0000
@@ -93,7 +93,9 @@ def find_exe(candidates, path):
                 full_path = os.path.join(directory, prog)
 
             if os.access(full_path, os.X_OK):
-                return full_path
+                # The thing is in the PATH already (or we wouldn't
+                # have found it. Need just the basename.
+                return os.path.basename(full_path)
 
     return None
 

Reply via email to