From 403261a293f01ec805481e842fa6bd6b688a13df Mon Sep 17 00:00:00 2001 From: ed Date: Wed, 12 May 2021 21:21:07 +0200 Subject: [PATCH] support pyinstaller --- copyparty/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/copyparty/__init__.py b/copyparty/__init__.py index 1e1af8c1..d82b655f 100644 --- a/copyparty/__init__.py +++ b/copyparty/__init__.py @@ -24,6 +24,9 @@ MACOS = platform.system() == "Darwin" class EnvParams(object): def __init__(self): self.mod = os.path.dirname(os.path.realpath(__file__)) + if self.mod.endswith("__init__"): + self.mod = os.path.dirname(self.mod) + if sys.platform == "win32": self.cfg = os.path.normpath(os.environ["APPDATA"] + "/copyparty") elif sys.platform == "darwin":