Skip to content

Commit

Permalink
cannot create file in the default working directory in osx app bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
doctorguile committed Mar 15, 2014
1 parent 0aafd79 commit 6d9e6d9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion ggpo/common/settings.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
import pickle
import os.path
from PyQt4.QtCore import QSettings


Expand All @@ -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):
Expand Down
4 changes: 2 additions & 2 deletions ggpo/common/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 6d9e6d9

Please sign in to comment.