Skip to content

Commit 50cf92b

Browse files
committed
update moveLayerTarsInDir
1 parent a9b1350 commit 50cf92b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/LayerCache.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,9 @@ class LayerCache {
9090
}
9191

9292
private async moveLayerTarsInDir(fromDir: string, toDir: string) {
93-
const fromDirTrailingSlash = fromDir.endsWith(`/`) ? fromDir : `${fromDir}/`
9493
const layerTars = (await recursiveReaddir(fromDir))
9594
.filter(path => path.endsWith(`/layer.tar`))
96-
.map(path => path.replace(fromDirTrailingSlash, ``))
95+
.map(path => path.replace(`${fromDir}/`, ``))
9796

9897
const moveLayer = async (layer: string) => {
9998
const from = path.resolve(`${fromDir}/${layer}`)

0 commit comments

Comments
 (0)