1
0
mirror of https://github.com/haiwen/seafile-server.git synced 2025-09-18 16:35:42 +00:00

Don't delete fs and block when failed to verify (#680)

* Don't delete fs and block when failed to verify

* Modify log and remove block

---------

Co-authored-by: yangheran <heran.yang@seafile.com>
This commit is contained in:
feiniks
2024-08-12 11:17:58 +08:00
committed by GitHub
parent 9492a75d0d
commit 026a6d504f

View File

@@ -51,15 +51,13 @@ fsck_verify_seafobj (const char *store_id,
valid = seaf_fs_manager_verify_seafile (seaf->fs_mgr, store_id, version,
obj_id, TRUE, io_error);
if (!valid && !*io_error && repair) {
seaf_message ("File %s is damaged, remove it.\n", obj_id);
seaf_fs_manager_delete_object (seaf->fs_mgr, store_id, version, obj_id);
seaf_message ("File %s is damaged.\n", obj_id);
}
} else if (type == VERIFY_DIR) {
valid = seaf_fs_manager_verify_seafdir (seaf->fs_mgr, store_id, version,
obj_id, TRUE, io_error);
if (!valid && !*io_error && repair) {
seaf_message ("Dir %s is damaged, remove it.\n", obj_id);
seaf_fs_manager_delete_object (seaf->fs_mgr, store_id, version, obj_id);
seaf_message ("Dir %s is damaged.\n", obj_id);
}
}