Add a error handling on backup operation

This commit is contained in:
Gustavo Henrique Santos Souza de Miranda
2025-07-24 19:05:55 -03:00
parent 890fc470bb
commit 209099cc5e
2 changed files with 9 additions and 3 deletions
+1 -1
View File
@@ -27,7 +27,7 @@ class BackupService:
if file_path.is_file():
arcname = file_path.relative_to(diaries_root_path.parent)
zipf.write(file_path, arcname=arcname)
return True, None
return True, filename
except Exception as e:
return False, str(e)