Skip to content

Commit 6edb9fb

Browse files
committed
fix: dedupe
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
1 parent 47590c2 commit 6edb9fb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/storage/imagestore/imagestore.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1182,12 +1182,16 @@ retry:
11821182
blobUploadRemoved = true
11831183

11841184
dstRecord = path.Join(constants.GlobalBlobsRepo, ispec.ImageBlobsDir, dstDigest.Algorithm().String(), dstDigest.Encoded())
1185+
if !is.cache.UsesRelativePaths() {
1186+
dstRecord = path.Join(is.rootDir, dstRecord)
1187+
}
11851188

11861189
is.log.Debug().Str("src", src).Str("dst", dst).Str("dstRecord", dstRecord).Str("component", "dedupe").Msg("rename")
11871190
}
11881191

11891192
// cache record exists, but due to GC and upgrades from older versions,
11901193
// disk content and cache records may go out of sync
1194+
is.log.Debug().Bool("relpath?", is.cache.UsesRelativePaths()).Msg("check this")
11911195
if is.cache.UsesRelativePaths() {
11921196
dstRecord = path.Join(is.rootDir, dstRecord)
11931197
}

0 commit comments

Comments
 (0)