Open pr0voked opened 5 years ago
This seems relate to util selection, if I only install (sudo apt install) p7zip-full then the existing file is never detected, but when installing also (sudo apt install) p7zip-full unrar rar the detection starts working.
Seems related to function isAlreadyExtracted() and its utility selection.
As a sidenote, since skip-if-exists only does filename existence testing it is very inefficient to do chksfv before it (resulting in useless chksfv passes if nothing gets extracted).
FIY: I've attempted to do a more thorough comparison by extracting the filesizes from the archive and checking it against the extracted files:
https://gist.github.com/roboyoshi/590a25f0771c9ba847a50a1cc2f5fcb4
It's not well tested so far, but should be a simple PoC for better file checking.
I also see that my files are not deleted, when I use the --skip-if-exists option -- might be expected, but I'd think I havew to force it?
I'm planning on run a cron-job every 48 hours to mass-extract a bunch of new RAR files that will appear on my server. However, I won't be using --clean, and thus, the RAR files will continue to stay there - so I need a way to skip already extracted ones.
However, I've found the --skip-if-exists doesn't seem to want to work, and it will re-extract files, simply overwriting the already existing ones.
Any ideas on what I can do? I've checked, and double-checked, that the file is extracting to the same place (ran it about 3 times). Always the same file.