Skip to content
Snippets Groups Projects
Commit f6cd0f7f authored by Florent Thiery's avatar Florent Thiery
Browse files

use absolute paths, refs #21677

parent 4fe23365
No related branches found
No related tags found
No related merge requests found
...@@ -70,8 +70,8 @@ def test_backup_space(server): ...@@ -70,8 +70,8 @@ def test_backup_space(server):
def check_local_backup(path): def check_local_backup(path):
all_ok = True all_ok = True
for d in os.listdir(path): for d in os.listdir(path):
if os.path.isdir(d): subd = os.path.join(path, d)
subd = os.path.join(path, d) if os.path.isdir(subd):
latest = os.path.join(subd, 'latest') latest = os.path.join(subd, 'latest')
print('Checking %s' % latest) print('Checking %s' % latest)
if os.path.exists(latest): if os.path.exists(latest):
...@@ -86,8 +86,8 @@ def check_local_backup(path): ...@@ -86,8 +86,8 @@ def check_local_backup(path):
print('Backup %s is fine' % subd) print('Backup %s is fine' % subd)
else: else:
for dd in os.listdir(subd): for dd in os.listdir(subd):
if os.path.isdir(dd): subsubd = os.path.join(subd, dd)
subsubd = os.path.join(subd, dd) if os.path.isdir(subsubd):
all_ok = min(all_ok, check_local_backup(subsubd)) all_ok = min(all_ok, check_local_backup(subsubd))
return all_ok return all_ok
...@@ -98,7 +98,7 @@ def check_local_backups(paths): ...@@ -98,7 +98,7 @@ def check_local_backups(paths):
folders = paths.split(',') folders = paths.split(',')
for f in folders: for f in folders:
if f not in blacklist: if f not in blacklist:
print('Checking folder %s' % f) print('Checking top folder %s' % f)
all_ok = min(check_local_backup(f), all_ok) all_ok = min(check_local_backup(f), all_ok)
return all_ok return all_ok
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment