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 = {
|
directory_info = {
|
||||||
"config":{
|
"config":{
|
||||||
"sentinel":"settings",
|
"sentinel":"rules",
|
||||||
"possible_folders":[
|
"possible_folders":[
|
||||||
"/etc/maloja",
|
"/etc/maloja",
|
||||||
os.path.expanduser("~/.local/share/maloja")
|
os.path.expanduser("~/.local/share/maloja")
|
||||||
@ -80,19 +80,19 @@ def find_good_folder(datatype,configobject):
|
|||||||
# check each possible folder if its used
|
# check each possible folder if its used
|
||||||
for p in info['possible_folders']:
|
for p in info['possible_folders']:
|
||||||
if os.path.exists(pthj(p,info['sentinel'])):
|
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
|
configobject[info['setting']] = p
|
||||||
return p
|
return p
|
||||||
|
|
||||||
print("Could not find previous",datatype,"folder")
|
#print("Could not find previous",datatype,"folder")
|
||||||
# check which one we can use
|
# check which one we can use
|
||||||
for p in info['possible_folders']:
|
for p in info['possible_folders']:
|
||||||
if is_dir_usable(p):
|
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
|
configobject[info['setting']] = p
|
||||||
return p
|
return p
|
||||||
print("No folder can be used for",datatype)
|
#print("No folder can be used for",datatype)
|
||||||
print("This should not happen!")
|
#print("This should not happen!")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -246,7 +246,6 @@ else:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
data_directories = {
|
data_directories = {
|
||||||
"auth":pthj(dir_settings['state'],"auth"),
|
"auth":pthj(dir_settings['state'],"auth"),
|
||||||
"backups":pthj(dir_settings['state'],"backups"),
|
"backups":pthj(dir_settings['state'],"backups"),
|
||||||
|
Loading…
Reference in New Issue
Block a user