Skip to content

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

Open
@Somesh-bsai

Description

@Somesh-bsai

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);
}
})
);
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions