diff --git a/lib/ChangeLog b/lib/ChangeLog index b22f9a282b..579c24e92a 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,9 @@ +2006-01-05 Angus Leeming + + * scripts/lyxpreview_tools.py (find_exe): return only the basename of + the executable to avoid problems when the path to the exe contains + spaces. Fixes bug 2193. + 2006-01-02 Michael Gerz * layouts/amsart-seq.layout: fix typo in counter diff --git a/lib/scripts/lyxpreview_tools.py b/lib/scripts/lyxpreview_tools.py index 272f3158de..bab609706a 100644 --- a/lib/scripts/lyxpreview_tools.py +++ b/lib/scripts/lyxpreview_tools.py @@ -52,7 +52,11 @@ 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). Return just the basename to avoid + # problems when the path to the executable contains + # spaces. + return os.path.basename(full_path) return None