Page 1 of 1

Unusable RAR errors when destination directory contains RARs

Posted: January 31st, 2015, 5:37 pm
by animaniac
This past week, I began to receive random "Unusable RAR" errors, and after some troubleshooting, I discovered it had something to do with the category system. The error would only occur with one category I had set up. It turns out that when the destination directory for a particular category has errant RAR files leftover from a prior download, this error is produced. The download actually completes and the file is unRARed properly if you look at the directory, but the error is produced because I think unRAR/SABnzbd is trying to unRAR those errant files as well. If the category has a script associated with it, the script isn't triggered because of this error. Deleting the leftover RAR files from the destination folder makes the "Unusable RAR" errors go away for the same exact downloads.

I think this is easily reproducible, but please let me know if any other information is needed. Thanks for such a great piece of software.

Re: Unusable RAR errors when destination directory contains

Posted: February 2nd, 2015, 3:41 am
by shypike
Do you store all files of that category in a single folder?
If so, SABnzbd may be tempted to recursively unpack anything packed it sees.
You can use the option Config->Special->enable_recursive to disable this behaviour.
(A side effect will be that any RAR files within RAR files will not be unpacked.)

Re: Unusable RAR errors when destination directory contains

Posted: February 2nd, 2015, 9:28 pm
by animaniac
No. There's a temp folder for incomplete/in-progress downloads/multipart RARs, and then there's a separate "holding" folder for each category. This is where RARs are extracted. Extracted files are moved out of that folder to their final location by the script associated with the category. For some reason, in one case, some RAR split files landed in the holding folder, and then the issue arose with all subsequent downloads that attempted to extract to that holding folder. Does that make sense? Thanks!

Re: Unusable RAR errors when destination directory contains

Posted: February 3rd, 2015, 3:16 am
by shypike
No, it doesn't make sense to me.
Mainly because I don't know what the script does.
If you're using SABnzbd in a mode where it creates a separate folder for each job,
then it won't look outside that folder for unpacking.
Since I don't know where your script unpacks to, I cannot tell what can go wrong after that.

Re: Unusable RAR errors when destination directory contains

Posted: February 3rd, 2015, 1:23 pm
by animaniac
The script doesn't unpack; it just moves and renames. Unpacking is still handled by SABnzbd. The category is set to +Delete, with a folder assignment, and the script.

Re: Unusable RAR errors when destination directory contains

Posted: February 3rd, 2015, 1:34 pm
by animaniac
Also, the folder uses a * at the end, per "Ending the path with an asterisk * will prevent creation of job folders."

Re: Unusable RAR errors when destination directory contains

Posted: February 3rd, 2015, 3:07 pm
by shypike
The problem is, once the bad RAR files are dumped in the destination folder,
the recursive unpack feature of SABnzbd will want to keep unpacking.
The best fix for now is to disable recursive unpacking, it's rarely needed anyway.
Remove the checkmark for Config->Special->enable_recursive

Re: Unusable RAR errors when destination directory contains

Posted: February 23rd, 2015, 4:28 am
by animaniac
Sorry about the slow reply. Thanks for explaining and for the fix!

Re: Unusable RAR errors when destination directory contains

Posted: February 23rd, 2015, 3:17 pm
by shypike
Removing the faulty RAR files also helps of course.

Re: Unusable RAR errors when destination directory contains

Posted: February 23rd, 2015, 6:58 pm
by animaniac
Yep. Figured that out. I'm just wondering how the bad RAR files got there in the first place. I've had this set up for years, and this is the first (and so far only) time this issue has arose.

Re: Unusable RAR errors when destination directory contains

Posted: February 24th, 2015, 10:24 am
by shypike
animaniac wrote: I'm just wondering how the bad RAR files got there in the first place.
Sometimes posters screw up.