1
0
mirror of https://github.com/haiwen/seafile-server.git synced 2025-09-02 07:54:27 +00:00

Merge same repo once and check fs object is valid (#578)

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
This commit is contained in:
feiniks
2022-09-28 16:43:07 +08:00
committed by GitHub
parent 550e75cb0b
commit 04350f2b99
8 changed files with 127 additions and 46 deletions

View File

@@ -255,8 +255,7 @@ func diffTestFileCB(ctx context.Context, baseDir string, files []*fsmgr.SeafDire
}
if file1 != nil &&
(file2 == nil || file1.ID != file2.ID) &&
file1.ID != emptySHA1 {
(file2 == nil || file1.ID != file2.ID) {
*results = append(*results, file1.ID)
}
@@ -273,8 +272,7 @@ func diffTestDirCB(ctx context.Context, baseDir string, dirs []*fsmgr.SeafDirent
}
if dir1 != nil &&
(dir2 == nil || dir1.ID != dir2.ID) &&
dir1.ID != emptySHA1 {
(dir2 == nil || dir1.ID != dir2.ID) {
*results = append(*results, dir1.ID)
}