diff --git a/ggpo/common/settings.py b/ggpo/common/settings.py index d0b9b8c..ce481ed 100644 --- a/ggpo/common/settings.py +++ b/ggpo/common/settings.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- import pickle +import os.path from PyQt4.QtCore import QSettings @@ -25,7 +26,7 @@ class Settings: WINE_LOCATION = 'wineLocation' GEOIP2DB_LOCATION = 'geoip2dbLocation' - _settings = QSettings('ggpo.ini', QSettings.IniFormat) + _settings = QSettings(os.path.join(os.path.expanduser("~"), 'ggpo.ini'), QSettings.IniFormat) @staticmethod def setBoolean(key, val): diff --git a/ggpo/common/util.py b/ggpo/common/util.py index 08b1cfc..e488ccf 100644 --- a/ggpo/common/util.py +++ b/ggpo/common/util.py @@ -9,7 +9,7 @@ from PyQt4 import QtGui, QtCore from ggpo.common.settings import Settings from ggpo.common import copyright - +from os.path import expanduser def checkUpdate(): versionurl = 'https://raw.github.com/doctorguile/pyqtggpo/master/VERSION' @@ -131,7 +131,7 @@ def loggerInit(): _logger = logging.getLogger('GGPO') _logger.setLevel(logging.INFO) fh = logging.handlers.RotatingFileHandler( - 'ggpo.log', mode='a', maxBytes=100000, backupCount=4) + os.path.join(expanduser("~"), 'ggpo.log'), mode='a', maxBytes=100000, backupCount=4) if Settings.value(Settings.DEBUG_LOG): fh.setLevel(logging.INFO) else: