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,6 +55,9 @@ log = logging.getLogger("config")
def get_default_config_path(): def get_default_config_path():
"""Returns the path where the fpdb config file _should_ be stored.""" """Returns the path where the fpdb config file _should_ be stored."""
if os.name == 'posix': if os.name == 'posix':
if (os.uname()[0]=="Darwin"):
config_path = os.path.join(os.getenv("HOME"), ".fpdb")
else:
config_path = os.path.join(os.path.expanduser("~"), '.fpdb') config_path = os.path.join(os.path.expanduser("~"), '.fpdb')
elif os.name == 'nt': elif os.name == 'nt':
config_path = os.path.join(unicode(os.environ[u"APPDATA"], "latin-1"), u"fpdb") config_path = os.path.join(unicode(os.environ[u"APPDATA"], "latin-1"), u"fpdb")