Incoming NZB directory should ignore . files for Mac OSX

Want something added? Ask for it here.
Post Reply
Zep
Newbie
Newbie
Posts: 3
Joined: July 30th, 2012, 12:41 pm

Incoming NZB directory should ignore . files for Mac OSX

Post by Zep »

Hi all,

I use SABnzbd on a QNAP NAS appliance, and one of the ways that I add NZB's to SABnzbd is to copy the NZB file into the incoming "watched" directory. After copying some NZB files in recently, I noticed that the SABnzbd interface was showing some warnings. Looking further, I discovered that SABnzbd was trying to process files beginning with the . character.

Mac OSX keeps metadata in files that begin with a . character and so whenever any normal files are copied over into the watched NZB directory, the corresponding metadata . files are also automatically created.

My feature request is to have SABnzbd ignore files in the watched directory when those files begin with a "." character.

Thanks - I love the program!
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Incoming NZB directory should ignore . files for Mac OSX

Post by shypike »

I agree about the need to ignore such files and I'll fix that.

Sub-folders are already ignored, because they're only looked at when named after a category.
Still, I'm a bit puzzled because a file must have an extension .nzb .zip or .gz to be ever looked at.
How are these files called on your system?
Do you have an example?
hanker
Newbie
Newbie
Posts: 27
Joined: December 8th, 2011, 9:25 am

Re: Incoming NZB directory should ignore . files for Mac OSX

Post by hanker »

shypike wrote:I agree about the need to ignore such files and I'll fix that.

Sub-folders are already ignored, because they're only looked at when named after a category.
Still, I'm a bit puzzled because a file must have an extension .nzb .zip or .gz to be ever looked at.
How are these files called on your system?
Do you have an example?

I'm not the OP, but I use a Mac and I also see this issue. Say that I have copied a .nzb file from my Mac to the watch folder on the linux box that sab runs on. Then if I do

$ls -al

in the watch folder, I'll see

whatever.nzb

which is the .nzb file, and I'll see

._whatever.nzb

which is not really a .nzb file. (Not totally sure what it is. "Resource fork" maybe? Nothing that sab needs anyway.)

So sab gets confused and throws an error message. No harm results; it's just a message.

As far as I know there's no way to disable this (arguably) broken behavior on the Mac side of things. But if you could just make it to where sab ignores all files whose names start with a . (dot) in the watch folder, that would fix this behavior.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Incoming NZB directory should ignore . files for Mac OSX

Post by shypike »

It's easy enough to fix, but I was just wondering about why it went wrong.
Personally I have a NetGear server, which doesn't show this behaviour.
It just creates a few hidden sub folders in which meta-date is stored.
Those are already ignored by SABnzbd.
Zep
Newbie
Newbie
Posts: 3
Joined: July 30th, 2012, 12:41 pm

Re: Incoming NZB directory should ignore . files for Mac OSX

Post by Zep »

Hanker - thanks for replying. This is exactly the behavior I'm seeing.

Mac creates these resource fork files which have the same filename *and* the same extension as the original file, but with a leading period (.) before the filename. Mac also seems to create a few other metadata files and folders as well. Here's a quick paste from the command line of my QNAP 419+:

drwxrwxrwx 28 admin administ 4096 Mar 29 22:35 ../
drwxrwxrwx 4 admin administ 4096 Jul 15 03:56 .@__thumb/
drwxrwxrwx 2 admin administ 4096 Jul 31 20:27 .AppleDB/
drwxrwxrwx 2 admin everyone 4096 Jul 31 20:27 .AppleDesktop/
drwxrwxrwx 2 admin everyone 4096 Jul 31 20:27 .AppleDouble/
-rwxrw-rw- 1 admin everyone 15364 Jul 15 21:21 .DS_Store*
-rw-rw-rw- 1 admin everyone 21508 Jul 28 12:30 :2eDS_Store
drwxrwxrwx 4 admin everyone 4096 Jun 22 2011 :2eTemporaryItems/

This only happens when I use the 'incoming directory watch' feature, so it's not every day that I see this problem. I usually use the API linkage from nzbmatrix to send NZB's to SABnzbd. But thought I'd mention.

Thanks for the quick reply!
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Incoming NZB directory should ignore . files for Mac OSX

Post by shypike »

None of the listed folders are a problem.
The only issue is with pseudo NZB files that start with a period,
those will be ignored by 0.7.3Beta2
Zep
Newbie
Newbie
Posts: 3
Joined: July 30th, 2012, 12:41 pm

Re: Incoming NZB directory should ignore . files for Mac OSX

Post by Zep »

Yes, thanks. I was showing an example of some of the other types of files that Mac OSX hides in a directory as well to ensure you had all the information you needed.

Thanks again.
Post Reply