Added "smart" file_strategy option #317
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.