update path parsing

This commit is contained in:
bethanyj28 committed 2024-02-23 08:42:23 -05:00
1 parent 7ce56d13f1
commit d071e77495
1 file changed
+2 -1
+2 -1
View File
@@ -94,7 +94,8 @@ export async function streamExtractExternal(
})
.pipe(unzip.Parse())
.on('entry', (entry: unzip.Entry) => {
const fullPath = path.normalize(path.join(directory, entry.path))
const entryPath = path.normalize(entry.path).replace(/^(\.\.(\/|\\|$))+/, '')
const fullPath = path.join(directory, entryPath)
core.debug(`Extracting artifact entry: ${fullPath}`)
if (entry.type === 'Directory') {
promises.push(resolveOrCreateDirectory(fullPath).then(() => {}))