2020-02-20 14:42:12 +00:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
import os.path as path
|
2020-04-17 10:31:47 +00:00
|
|
|
import sys
|
2020-02-20 14:42:12 +00:00
|
|
|
from os import getenv
|
|
|
|
|
|
|
|
userdata = ""
|
|
|
|
homedata = path.expanduser("~")
|
|
|
|
|
|
|
|
if getenv("APPDATA"):
|
2020-04-17 10:31:47 +00:00
|
|
|
userdata = getenv("APPDATA") + path.sep + "deemix" + path.sep
|
2020-02-20 14:42:12 +00:00
|
|
|
elif sys.platform.startswith('darwin'):
|
2020-04-17 10:31:47 +00:00
|
|
|
userdata = homedata + '/Library/Application Support/deemix/'
|
2020-02-20 14:42:12 +00:00
|
|
|
elif getenv("XDG_CONFIG_HOME"):
|
2020-04-17 10:31:47 +00:00
|
|
|
userdata = getenv("XDG_CONFIG_HOME") + '/deemix/';
|
2020-02-20 14:42:12 +00:00
|
|
|
else:
|
2020-04-17 10:31:47 +00:00
|
|
|
userdata = homedata + '/.config/deemix/';
|
|
|
|
|
2020-02-20 14:42:12 +00:00
|
|
|
|
|
|
|
def getHomeFolder():
|
2020-04-17 10:31:47 +00:00
|
|
|
return homedata
|
|
|
|
|
|
|
|
|
2020-02-20 14:42:12 +00:00
|
|
|
def getConfigFolder():
|
2020-04-17 10:31:47 +00:00
|
|
|
return userdata
|