Added standard identity storage folder

This commit is contained in:
Mark Qvist 2022-05-22 19:09:16 +02:00
parent 6ea7d78b31
commit 49c8ada478
1 changed files with 4 additions and 0 deletions

View File

@ -181,6 +181,7 @@ class Reticulum:
Reticulum.storagepath = Reticulum.configdir+"/storage" Reticulum.storagepath = Reticulum.configdir+"/storage"
Reticulum.cachepath = Reticulum.configdir+"/storage/cache" Reticulum.cachepath = Reticulum.configdir+"/storage/cache"
Reticulum.resourcepath = Reticulum.configdir+"/storage/resources" Reticulum.resourcepath = Reticulum.configdir+"/storage/resources"
Reticulum.identitypath = Reticulum.configdir+"/storage/identities"
Reticulum.__transport_enabled = False Reticulum.__transport_enabled = False
Reticulum.__use_implicit_proof = True Reticulum.__use_implicit_proof = True
@ -216,6 +217,9 @@ class Reticulum:
if not os.path.isdir(Reticulum.resourcepath): if not os.path.isdir(Reticulum.resourcepath):
os.makedirs(Reticulum.resourcepath) os.makedirs(Reticulum.resourcepath)
if not os.path.isdir(Reticulum.identitypath):
os.makedirs(Reticulum.identitypath)
if os.path.isfile(self.configpath): if os.path.isfile(self.configpath):
try: try:
self.config = ConfigObj(self.configpath) self.config = ConfigObj(self.configpath)