mirror of
https://github.com/krateng/maloja.git
synced 2023-08-10 21:12:55 +03:00
Finishing touches
This commit is contained in:
parent
97e8d5b18d
commit
7299c2e07e
@ -36,7 +36,7 @@ def get_env_vars(key,pathsuffix=[]):
|
||||
|
||||
directory_info = {
|
||||
"config":{
|
||||
"sentinel":"settings",
|
||||
"sentinel":"rules",
|
||||
"possible_folders":[
|
||||
"/etc/maloja",
|
||||
os.path.expanduser("~/.local/share/maloja")
|
||||
@ -80,19 +80,19 @@ def find_good_folder(datatype,configobject):
|
||||
# check each possible folder if its used
|
||||
for p in info['possible_folders']:
|
||||
if os.path.exists(pthj(p,info['sentinel'])):
|
||||
print(p,"has been determined as maloja's folder for",datatype)
|
||||
#print(p,"has been determined as maloja's folder for",datatype)
|
||||
configobject[info['setting']] = p
|
||||
return p
|
||||
|
||||
print("Could not find previous",datatype,"folder")
|
||||
#print("Could not find previous",datatype,"folder")
|
||||
# check which one we can use
|
||||
for p in info['possible_folders']:
|
||||
if is_dir_usable(p):
|
||||
print(p,"has been selected as maloja's folder for",datatype)
|
||||
#print(p,"has been selected as maloja's folder for",datatype)
|
||||
configobject[info['setting']] = p
|
||||
return p
|
||||
print("No folder can be used for",datatype)
|
||||
print("This should not happen!")
|
||||
#print("No folder can be used for",datatype)
|
||||
#print("This should not happen!")
|
||||
|
||||
|
||||
|
||||
@ -246,7 +246,6 @@ else:
|
||||
}
|
||||
|
||||
|
||||
|
||||
data_directories = {
|
||||
"auth":pthj(dir_settings['state'],"auth"),
|
||||
"backups":pthj(dir_settings['state'],"backups"),
|
||||
|
Loading…
Reference in New Issue
Block a user