Why rename to _UNPACK_ when it's just moving/copying the dir?

Get help with all aspects of SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
Assmonkey
Newbie
Newbie
Posts: 8
Joined: July 30th, 2009, 4:04 pm

Why rename to _UNPACK_ when it's just moving/copying the dir?

Post by Assmonkey »

I'm not using any Unpacking on my downloads, just the PAR check. When the download completes and it gets moved according to what is set up in the categories, it first creates the folder with _UNPACK_ in the name. When it's done copying, it renames itself by removing the _UNPACK_ part. Why do this in the first place since it's basically just copying/moving the directory in question?
If someone enters the dir while SABnzbd is still copying files to it, SABnzbd won't be able to rename it since it's in use. Any way of stopping this behavior?
User avatar
switch
Moderator
Moderator
Posts: 1380
Joined: January 17th, 2008, 3:55 pm
Location: UK

Re: Why rename to _UNPACK_ when it's just moving/copying the dir?

Post by switch »

There is no way to stop this behaviour currently.

We use it as an indication that the file is not yet complete, as moving or unpacking can take a long period, depending on whether it it being movied to other hard drives or partitions.

Yes _UNPACK_ is technically wrong and should maybe be changed to _MOVING_ however it is still a good indication that the download is not yet finished.
meh
Release Testers
Release Testers
Posts: 7
Joined: January 10th, 2009, 9:34 am

Re: Why rename to _UNPACK_ when it's just moving/copying the dir?

Post by meh »

Ah, that reminds me - if the unrar fails, the _UNPACK_ folder will remain. Maybe a rename would be in place, if possible.
User avatar
switch
Moderator
Moderator
Posts: 1380
Joined: January 17th, 2008, 3:55 pm
Location: UK

Re: Why rename to _UNPACK_ when it's just moving/copying the dir?

Post by switch »

The folder should be renamed from _UNPACK_ to _FAILED_ assuming it is allowed to rename the folder by the operating system. If it isn't, please verify an anti-virus or media scanner is not preventing a rename from taking place and file a bug report.
Assmonkey
Newbie
Newbie
Posts: 8
Joined: July 30th, 2009, 4:04 pm

Re: Why rename to _UNPACK_ when it's just moving/copying the dir?

Post by Assmonkey »

Well technically the release/files are done, in the the complete folder, so all it is doing now is moving it to the folder entered in the category section. I just don't see the benefit of putting it into a folder and then rename the folder when it's done with the filecopy, imo it only creates more possible problems/things that can go wrong. :)
User avatar
switch
Moderator
Moderator
Posts: 1380
Joined: January 17th, 2008, 3:55 pm
Location: UK

Re: Why rename to _UNPACK_ when it's just moving/copying the dir?

Post by switch »

The files are moved from the incomplete folder directly to the category location. This can be on another drive, partition, or even over a network so it can take some time to complete. The rename of the folder is an easy way to tell from explorer that the download is not yet finished.
Assmonkey
Newbie
Newbie
Posts: 8
Joined: July 30th, 2009, 4:04 pm

Re: Why rename to _UNPACK_ when it's just moving/copying the dir?

Post by Assmonkey »

Any way to modify what it gets renamed to? Like you said, _UNPACK_ doesn't make much sense in my case and somebody accessing my server won't know what to do with a dir with that name.
I'd rather have it like this if it has to be renamed to something:

Dir_Name_Here.INCOMPLETE
Post Reply