attempted fix for OSX startup problem

This commit is contained in:
Steffen Schaumburg 2011-03-15 21:18:42 +01:00
parent 8a9a227735
commit 5262746996

View File

@ -55,7 +55,10 @@ log = logging.getLogger("config")
def get_default_config_path():
"""Returns the path where the fpdb config file _should_ be stored."""
if os.name == 'posix':
config_path = os.path.join(os.path.expanduser("~"), '.fpdb')
if (os.uname()[0]=="Darwin"):
config_path = os.path.join(os.getenv("HOME"), ".fpdb")
else:
config_path = os.path.join(os.path.expanduser("~"), '.fpdb')
elif os.name == 'nt':
config_path = os.path.join(unicode(os.environ[u"APPDATA"], "latin-1"), u"fpdb")
#print u"path after joining in get_default_config_path:",config_path