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

Added "smart" file_strategy option #317

Merged
merged 2 commits into from Jun 15, 2020

Conversation

dukrous
Copy link
Contributor

@dukrous dukrous commented Jun 1, 2020

Fixed a couple annoying behaviors I'd seen: zipfile.BadZipFile exception and a habit of creating empty directories when extracting files from zips.

I also added a new function: --file_strategy smart

What this does is copy over the first instance of a file as normal. However, any subsequent copy will be hardlinked from that original source. This would save on space when building a pack to another disk that could use hardlinks. Since the links reference a file on the same target, this would dramatically save on space. For instance, the SD2SNES pack right now weighs in at 25.4 GB, but using "smart" (I couldnt come up with another name...feel free to change it) it only takes up 15 GB of real space. I've tested this on ext4, ntfs, and exfat (it just copies on exfat since it generates an OSError exception and I caught that).

This should also make it possible to create CD based Game Series Collections without using up a ton of space.

@frederic-mahe
Copy link
Owner

thanks @dukrous the --file_strategy smart is a very good idea! I'll update the documentation, please feel free to comment if need be.

@frederic-mahe frederic-mahe merged commit d4c4405 into frederic-mahe:master Jun 15, 2020
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

Successfully merging this pull request may close these issues.

None yet

2 participants