2020-09-27 21:44:37 +00:00
|
|
|
from pathlib import Path
|
2020-04-17 10:31:47 +00:00
|
|
|
import sys
|
2020-02-20 14:42:12 +00:00
|
|
|
from os import getenv
|
|
|
|
|
|
|
|
userdata = ""
|
2020-09-27 21:44:37 +00:00
|
|
|
homedata = Path.home()
|
2020-02-20 14:42:12 +00:00
|
|
|
|
|
|
|
if getenv("APPDATA"):
|
2020-09-27 21:44:37 +00:00
|
|
|
userdata = Path(getenv("APPDATA")) / "deemix"
|
2020-02-20 14:42:12 +00:00
|
|
|
elif sys.platform.startswith('darwin'):
|
2020-09-27 21:44:37 +00:00
|
|
|
userdata = homedata / 'Library' / 'Application Support' / 'deemix'
|
2020-02-20 14:42:12 +00:00
|
|
|
elif getenv("XDG_CONFIG_HOME"):
|
2020-09-27 21:44:37 +00:00
|
|
|
userdata = Path(getenv("XDG_CONFIG_HOME")) / 'deemix'
|
2020-02-20 14:42:12 +00:00
|
|
|
else:
|
2020-09-27 21:44:37 +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
|