Skip to content

Commit 952c36c

Browse files
committed
fix recoverUnformattedSaveKey
1 parent 120939d commit 952c36c

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/LayerCache.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -242,13 +242,6 @@ class LayerCache {
242242
return 'image'
243243
}
244244

245-
async getIdhashesPathFriendly(): Promise<string> {
246-
const result = crypto.createHash(`sha256`).update((await this.getLayerIds()).join(`-`), `utf8`).digest(`hex`)
247-
core.debug(JSON.stringify({ log: `getIdhashesPathFriendly`, result }))
248-
return result
249-
}
250-
251-
252245
genSingleLayerStorePath(id: string) {
253246
return `${this.getLayerCachesDir()}/${id}/layer.tar`
254247
}
@@ -283,7 +276,9 @@ class LayerCache {
283276
}
284277

285278
async recoverUnformattedSaveKey() {
286-
const hash = await loadRawManifests(this.getUnpackedTarDir())
279+
const hash = await this.generateRootHashFromManifest()
280+
core.debug(JSON.stringify({ log: `recoverUnformattedSaveKey`, hash}))
281+
287282
return this.restoredRootKey.replace(hash, `{hash}`).replace(/-root$/, ``)
288283
}
289284

0 commit comments

Comments
 (0)