We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 56b8c09 commit 826028eCopy full SHA for 826028e
src/LayerCache.ts
@@ -93,7 +93,10 @@ class LayerCache {
93
}
94
95
private async moveLayerTarsInDir(fromDir: string, toDir: string) {
96
- const layerTars = (await recursiveReaddir(fromDir)).filter(path => path.endsWith(`/layer.tar`))
+ const fromDirTrailingSlash = fromDir.endsWith(`/`) ? fromDir : `${fromDir}/`
97
+ const layerTars = (await recursiveReaddir(fromDir))
98
+ .filter(path => path.endsWith(`/layer.tar`))
99
+ .map(path => path.replace(fromDirTrailingSlash, ``))
100
101
const moveLayer = async (layer: string) => {
102
const from = path.resolve(`${fromDir}/${layer}`)
0 commit comments