mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2025-08-22 00:29:09 +08:00
update path parsing
This commit is contained in:
parent
1e326de474
commit
d3301c9bc2
@ -94,7 +94,8 @@ export async function streamExtractExternal(
|
|||||||
})
|
})
|
||||||
.pipe(unzip.Parse())
|
.pipe(unzip.Parse())
|
||||||
.on('entry', (entry: unzip.Entry) => {
|
.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}`)
|
core.debug(`Extracting artifact entry: ${fullPath}`)
|
||||||
if (entry.type === 'Directory') {
|
if (entry.type === 'Directory') {
|
||||||
promises.push(resolveOrCreateDirectory(fullPath).then(() => {}))
|
promises.push(resolveOrCreateDirectory(fullPath).then(() => {}))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user