Skip to content

Commit 83ae0d0

Browse files
authored
Merge branch 'main' into feature/add-setting-class
2 parents e0e1788 + 1b0a250 commit 83ae0d0

File tree

5 files changed

+122
-95
lines changed

5 files changed

+122
-95
lines changed

badges/date.log

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Thu Jan 9 16:45:57 UTC 2025
1+
Thu Jan 9 16:45:57 UTC 2025

ecodev_core/backup.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,10 @@ def _get_old_backups(file_to_backup: Path, nb_saves: int) -> List[str]:
8080
"""
8181
Retrieve old versions of file_to_backup in order to erase them (more than nb_saves ago)
8282
"""
83-
output = run(['lftp', '-c', f'open {BACKUP_URL}; ls {file_to_backup.name.split(".")[0]}*'],
83+
output = run(['lftp', '-c', f'open {BACKUP_URL}; ls'],
8484
capture_output=True, text=True)
85-
all_backups = sorted([x.split(' ')[-1] for x in output.stdout.splitlines()])
85+
filename_base = file_to_backup.name.split('.')[0]
86+
all_backups = sorted([x.split(' ')[-1]
87+
for x in output.stdout.splitlines() if filename_base in x])
8688
log.info(f'existing remote backups {all_backups}')
8789
return all_backups[:-nb_saves]

0 commit comments

Comments
 (0)