gevent #287

Merged
Atheros1 merged 19 commits from master into master 2013-07-05 22:59:12 +02:00
3 changed files with 12 additions and 1 deletions
Showing only changes of commit 20994adf78 - Show all commits

View File

@ -124,7 +124,18 @@ def lookupAppdataFolder():
elif 'win32' in sys.platform or 'win64' in sys.platform:
dataFolder = path.join(environ['APPDATA'], APPNAME) + '\\'
else:
dataFolder = path.expanduser(path.join("~", "." + APPNAME + "/"))
from shutil import move
try:
dataFolder = path.join(environ["XDG_CONFIG_HOME"], APPNAME)
except KeyError:
dataFolder = path.join(environ["HOME"], ".config", APPNAME)
# Migrate existing data to the proper location if this is an existing install
try:
print "Moving data folder to ~/.config/%s" % APPNAME
move(path.join(environ["HOME"], ".%s" % APPNAME), dataFolder)
dataFolder = dataFolder + '/'
except IOError:
dataFolder = dataFolder + '/'
return dataFolder
def isAddressInMyAddressBook(address):