Skip to content

Commit 11b1f69

Browse files
committed
WIP
1 parent 0d9d110 commit 11b1f69

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/LayerCache.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -198,20 +198,23 @@ class LayerCache {
198198
}
199199

200200
getUnpackedTarDir(): string {
201-
return `${this.getImagesDir()}/${this.getIdhashesPathFriendly()}`
201+
return path.resolve(`${this.getImagesDir()}/${this.getCurrentTarStoreDir()}`)
202202
}
203203

204204
getLayerCachesDir() {
205205
return `${this.getUnpackedTarDir()}-layers`
206206
}
207207

208208
getSavedImageTarDir(): string {
209-
return `${this.getImagesDir()}/${this.getIdhashesPathFriendly()}`
209+
return path.resolve(`${this.getImagesDir()}/${this.getCurrentTarStoreDir()}`)
210+
}
211+
212+
getCurrentTarStoreDir(): string {
213+
return 'image'
210214
}
211215

212216
getIdhashesPathFriendly(): string {
213-
return ''
214-
// return crypto.createHash(`sha256`).update(this.ids.join(`-`), `utf8`).digest(`hex`)
217+
return crypto.createHash(`sha256`).update(this.ids.join(`-`), `utf8`).digest(`hex`)
215218
}
216219

217220
getRootKey(): string {

0 commit comments

Comments
 (0)