From 7be8b57a7c06302ec5e4eba5d178ee5d5c05763e Mon Sep 17 00:00:00 2001 From: HomeWorld Date: Wed, 22 Sep 2010 23:44:39 +0300 Subject: [PATCH] Included correct path detection when pyfa is ran from a distribution pack (frozen state) --- config.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/config.py b/config.py index 3fd47dc1d..eef59ef4a 100644 --- a/config.py +++ b/config.py @@ -4,6 +4,11 @@ import sys debug = False #Path autodetection, only change if it doesn't work -path = os.path.dirname(unicode(__file__, sys.getfilesystemencoding())) + +if hasattr(sys, "frozen"): + path = os.path.dirname(unicode(sys.executable, sys.getfilesystemencoding( ))) +else: + path = os.path.dirname(unicode(__file__, sys.getfilesystemencoding())) + homePath = os.path.expanduser(os.path.join("~", ".pyfa"))