Skip to content

Commit

Permalink
only add existing directories to path
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@24005 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Sep 27, 2019
1 parent abd5073 commit 389239a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/xpra/platform/win32/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,11 @@
if frozen:
#cx_freeze paths:
PATH = os.environ.get("PATH", "").split(os.pathsep)
edir = os.path.dirname(sys.executable)
edir = os.path.abspath(os.path.dirname(sys.executable))
libdir = os.path.join(edir, "lib")
for d in (edir, libdir):
if not os.path.exists(d) or not os.path.isdir(d):
continue
if d not in sys.path:
sys.path.append(d)
if d not in PATH:
Expand Down

0 comments on commit 389239a

Please sign in to comment.