diff --git a/src/calibre/utils/filenames.py b/src/calibre/utils/filenames.py index 913c0836e1..f8ec7f6da2 100644 --- a/src/calibre/utils/filenames.py +++ b/src/calibre/utils/filenames.py @@ -88,10 +88,9 @@ def shorten_components_to(length, components, more_to_take=0, last_has_extension def find_executable_in_path(name, path=None): if path is None: path = os.environ.get('PATH', '') - sep = ';' if iswindows else ':' if iswindows and not name.endswith('.exe'): name += '.exe' - path = path.split(sep) + path = path.split(os.pathsep) for x in path: q = os.path.abspath(os.path.join(x, name)) if os.access(q, os.X_OK):