Get proper userdir on some platforms
This commit is contained in:
1 parent
fd462514c3
commit
6220d3e63d
1 file changed
+2
@@ -1,6 +1,7 @@
|
|||||||
import hashlib
|
import hashlib
|
||||||
import os.path
|
import os.path
|
||||||
import platform
|
import platform
|
||||||
|
import pwd
|
||||||
import re
|
import re
|
||||||
|
|
||||||
def getDataDir():
|
def getDataDir():
|
||||||
@@ -9,6 +10,7 @@ def getDataDir():
|
|||||||
if os.name == 'nt':
|
if os.name == 'nt':
|
||||||
return os.path.join(os.environ['APPDATA'], 'CouchPotato')
|
return os.path.join(os.environ['APPDATA'], 'CouchPotato')
|
||||||
|
|
||||||
|
os.environ['HOME'] = pwd.getpwuid(os.geteuid()).pw_dir
|
||||||
user_dir = os.path.expanduser('~')
|
user_dir = os.path.expanduser('~')
|
||||||
|
|
||||||
# OSX
|
# OSX
|
||||||
|
|||||||
Reference in new issue
Block a user