Skip to content

Commit 4095a27

Browse files
feiniksHeran Yang
andauthored
Check truncate time when check file size (#780)
Co-authored-by: Heran Yang <heran.yang@seafile.com>
1 parent e39e798 commit 4095a27

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

server/gc/fsck.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -511,8 +511,10 @@ check_and_recover_repo (SeafRepo *repo, gboolean reset, FsckOptions *options)
511511
fsck_data.repo = repo;
512512
fsck_data.existing_blocks = g_hash_table_new_full (g_str_hash, g_str_equal,
513513
g_free, NULL);
514-
fsck_data.truncate_time = seaf_repo_manager_get_repo_truncate_time (seaf->repo_mgr,
515-
repo->id);
514+
if (options->check_file_size) {
515+
fsck_data.truncate_time = seaf_repo_manager_get_repo_truncate_time (seaf->repo_mgr,
516+
repo->id);
517+
}
516518

517519
root_id = fsck_check_dir_recursive (rep_commit->root_id, "/", &fsck_data);
518520
g_hash_table_destroy (fsck_data.existing_blocks);

0 commit comments

Comments
 (0)