Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: EISDIR illegal operation on a directory, open '{path to a dir in the zip file}' #102

Open
Somesh-bsai opened this issue Dec 12, 2022 · 3 comments

Comments

@Somesh-bsai
Copy link

Somesh-bsai commented Dec 12, 2022

Hi Folks,

I am facing this issue of illegal operation when I am trying to unzip a zip file which has multiple directories in it using decompress module.

Is it something related to the permissions of the particular zip file?

Sample Code:

var unzipFiles = async function (dirPath, dcmfolder) {
const files = fs.readdirSync(dirPath);
await Promise.all(
files.map(async (file) => {
const fullFilePath = path.join(dirPath, "/", file);
if (file.endsWith(".zip")) {
console.log("Inside unzip if condition");
await decompress(fullFilePath, dcmfolder);
}
})
);
};

@thisisjar
Copy link

thisisjar commented Jan 17, 2023

Screenshot 2023-01-17 112051
Can confirm - nested folder structure seems to break Node. I fear, like many (un)zip packages on npm - this one only supports unzipping all files inside a .zip.

@juliano-nunes
Copy link

I have the same issue when trying to decompress a zip that doesnt have files inside it.

@stheine
Copy link

stheine commented Apr 19, 2023

This is the same issue as described in #46 and a workaround described in there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants