Closed
Description
I have a tar file with the structure below:
mysample.tar.gz
HEADER.txt directory1 directory2 directory3
directory1/
resolv.conf resov.conf1 a1.txt
directory2/
stats.txt
Upon using the below line
await tar.x({cwd: extractionPath, file: fullFilePath});
I see that all files lose their directories, and come under one folder mentioned as "cwd" above. I really need to maintain the folder structure.
tar xf mysample.tar.gz -C extractionPath
which is supposed to behave similarly as tar.x doesn't match. I am not sure what else I should try.
Metadata
Metadata
Assignees
Labels
No labels