Finally squashed a directory bug, paths are set based on if you have root or not, and also are definable with a single arg
This commit is contained in:
parent
ee954c468f
commit
326341f509
@ -11,11 +11,13 @@ from xdg import BaseDirectory
|
|||||||
# Get configuration directory
|
# Get configuration directory
|
||||||
if len(sys.argv) > 1:
|
if len(sys.argv) > 1:
|
||||||
configPath = sys.argv[1]
|
configPath = sys.argv[1]
|
||||||
else if os.geteuid() == 0:
|
elif os.geteuid() == 0:
|
||||||
# Save settings system wide
|
# Save settings system wide
|
||||||
configPath = "/etc"
|
configPath = "/etc/fenrir.conf"
|
||||||
else
|
else:
|
||||||
# Use local settings
|
# Use local settings
|
||||||
configPath = BaseDirectory.xdg_config_data + "/fenrir"
|
configPath = BaseDirectory.xdg_data_home + "/fenrir"
|
||||||
|
if not os.path.exists(configPath): os.makedirs(configPath)
|
||||||
|
configPath = configPath + "/fenrir.conf"
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user