Page 1 of 1

0.6.2: double quotes not removed from directory name.

Posted: May 30th, 2011, 7:43 pm
by yokel
Fresh install on CentOs 5.6; double quotes remain in directory names. This is resulting in very strange names when viewed over a Samba share.
f.i. directory aa"bb is seen as AOQT10~3.

Both switches 'Replace dots in Foldername'  and ' Replace Illegal Characters in Folder Names' are enabled.

Re: 0.6.2: double quotes not removed from directory name.

Posted: May 31st, 2011, 1:41 am
by shypike
A double quote is a perfectly legal characters in Unix filenames.
For some reason Samba doesn't support it.
SABnzbd doesn't know that you are using Samba, because it only
deals with the native file system.
One work-around would be to use a pre-queue script in which
you remove the double quotes from the names.

Assuming you run from 0.6.2 sources, you can patch the code.
Module sabnzbd/misc.py
Replace lines 193/194

Code: Select all

    CH_ILLEGAL = r'/'
    CH_LEGAL   = r'+'
with these

Code: Select all

    CH_ILLEGAL = r'/"'
    CH_LEGAL   = r'+\''
Maybe it's a good idea to change this in the next release.
However, the problem remains that Samba probably uses
the rules for Windows, while SABnzbd uses the native Unix rules.

Re: 0.6.2: double quotes not removed from directory name.

Posted: May 31st, 2011, 4:28 am
by yokel
Thanks for the prompt reply.
Gonna try this as soon as I'm home.

Re: 0.6.2: double quotes not removed from directory name.

Posted: May 31st, 2011, 10:32 am
by yokel
Worked like a charm. (the code change that is)

Thanks again!

Re: 0.6.2: double quotes not removed from directory name.

Posted: January 15th, 2012, 1:38 pm
by Pearf
Hi,
this solution doesn't work for me. I'm on 0.5.4. Any suggestions?

Thanks

Re: 0.6.2: double quotes not removed from directory name.

Posted: January 16th, 2012, 6:29 am
by shypike
Upgrade?