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

Extracting ZIPs sometimes makes subfolders and others dont #129

Open
BenDOOH opened this issue Feb 8, 2022 · 1 comment
Open

Extracting ZIPs sometimes makes subfolders and others dont #129

BenDOOH opened this issue Feb 8, 2022 · 1 comment

Comments

@BenDOOH
Copy link

BenDOOH commented Feb 8, 2022

Depending on the zip file being extracted, it either makes a subdirectory with the name of the zip file as the folder and put its contents inside there or extracts the contents directly to targeted directory.

I want to control the behaviour across all extracted zips to be either extract everything in the targeted directory as it or make a subfolder of the named zip and push the zip content there. I cant seem to determine if there are optional parameters for this?

From observation, if the extracted zip has sub folders in it, it will then make a folder with the name of the zip and copy it all inside of it. Compared to a zip with no sub folders.

Are there any optional params to force one way of extracting?

@drikishuk
Copy link

There is a way around this, log out the entries and you will see a filepath you can use as a 'base'.
inside the onEntry callback you can then update the filepaths for all files and replace the name removing the 'base' from it.
after extraction you can then check if inside the folder the 'base' path exists and remove it.

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

2 participants