Skip to content

Commit 3e9afcd

Browse files
committed
add additional ReplaceAll in pathsep to cater for windows using backslash
1 parent cddd19e commit 3e9afcd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

services/doctor/storage.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,8 @@ func checkStorage(opts *checkStorageOptions) func(ctx context.Context, logger lo
121121
storer: storage.LFS,
122122
isOrphaned: func(path string, obj storage.Object, stat fs.FileInfo) (bool, error) {
123123
// The oid of an LFS stored object is the name but with all the path.Separators removed
124-
oid := strings.ReplaceAll(path, "/", "")
124+
oid_unix := strings.ReplaceAll(path, "/", "")
125+
oid := strings.ReplaceAll(oid_unix, "\\", "") // strip windows separator
125126
exists, err := git.ExistsLFSObject(ctx, oid)
126127
return !exists, err
127128
},

0 commit comments

Comments
 (0)