Updated configuration path defaults

This commit is contained in:
Mark Qvist 2022-09-30 20:37:46 +02:00
parent e51b0077c7
commit 76fb73f46c
1 changed files with 5 additions and 3 deletions

View File

@ -178,10 +178,12 @@ class Reticulum:
if configdir != None:
Reticulum.configdir = configdir
else:
if os.path.isdir(Reticulum.userdir+"/.reticulum") and os.path.isfile(Reticulum.userdir+"/.reticulum/config"):
Reticulum.configdir = Reticulum.userdir+"/.reticulum"
else:
if os.path.isdir(Reticulum.userdir+"/etc/reticulum") and os.path.isfile(Reticulum.userdir+"/etc/reticulum/config"):
Reticulum.configdir = Reticulum.userdir+"/etc/reticulum"
elif os.path.isdir(Reticulum.userdir+"/.config/reticulum") and os.path.isfile(Reticulum.userdir+"/.config/reticulum/config"):
Reticulum.configdir = Reticulum.userdir+"/.config/reticulum"
else:
Reticulum.configdir = Reticulum.userdir+"/.reticulum"
if logdest == RNS.LOG_FILE:
RNS.logdest = RNS.LOG_FILE