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

Does not obey --skip-if-exists. #48

Open
pr0voked opened this issue Sep 1, 2018 · 2 comments
Open

Does not obey --skip-if-exists. #48

pr0voked opened this issue Sep 1, 2018 · 2 comments
Labels

Comments

@pr0voked
Copy link

pr0voked commented Sep 1, 2018

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.

pr0voked@vps:/home/redacted/extracted/Dumbo.1941.1080p.BluRay.x264-LCHD# ls
lchd-dumbo1080p.mkv
pr0voked@vps:/home/redacted/extracted/Dumbo.1941.1080p.BluRay.x264-LCHD# cd /home/redacted/rared
pr0voked@vps:/home/redacted/rared# sudo bash /home/redacted/unrarall -v -o /home/redacted/extracted/Dumbo.1941.1080p.BluRay.x264-LCHD --allow-failures --full-path --skip-if-exists Dumbo.1941.1080p.BluRay.x264-LCHD
Using "/home/redacted/extracted/Dumbo.1941.1080p.BluRay.x264-LCHD/" as output directory
Detected GNU find
Using find: find
Detecting clean up hooks...
Found unrarall_clean_covers_folders
Found unrarall_clean_empty_folders
Found unrarall_clean_nfo
Found unrarall_clean_osx_junk
Found unrarall_clean_proof_folders
Found unrarall_clean_rar
Found unrarall_clean_sample_folders
Found unrarall_clean_sample_videos
Found unrarall_clean_windows_junk
Using virtual clean-up hook none
Looking for unrar...found
Using "unrar" to extract rar files
Working over directory "Dumbo.1941.1080p.BluRay.x264-LCHD/"
Install cksfv in order to get CRC checked before using unrar
Extracting (x) "Dumbo.1941.1080p.BluRay.x264-LCHD/lchd-dumbo1080p.rar"...
UNRAR 5.60 freeware      Copyright (c) 1993-2018 Alexander Roshal


Extracting from /home/redacted/rared/Dumbo.1941.1080p.BluRay.x264-LCHD/lchd-dumbo1080p.rar

Extracting  lchd-dumbo1080p.mkv                                        1%

Extracting from /home/redacted/rared/Dumbo.1941.1080p.BluRay.x264-LCHD/lchd-dumbo1080p.r00

...         lchd-dumbo1080p.mkv 

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.

@pr0voked pr0voked closed this as completed Sep 1, 2018
@pr0voked pr0voked reopened this Sep 1, 2018
@qriff
Copy link

qriff commented Mar 19, 2019

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).

@roboyoshi
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants