0.6.2: double quotes not removed from directory name.

Report & discuss bugs found in SABnzbd

0.6.2: double quotes not removed from directory name.

Postby yokel » May 30th, 2011, 8:43 pm

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.
yokel
Newbie
Newbie
 
Posts: 3
Joined: May 30th, 2011, 8:34 pm

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

Postby shypike » May 31st, 2011, 2:41 am

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.
User avatar
shypike
Administrator
Administrator
 
Posts: 16534
Joined: January 18th, 2008, 1:49 pm

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

Postby yokel » May 31st, 2011, 5:28 am

Thanks for the prompt reply.
Gonna try this as soon as I'm home.
yokel
Newbie
Newbie
 
Posts: 3
Joined: May 30th, 2011, 8:34 pm

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

Postby yokel » May 31st, 2011, 11:32 am

Worked like a charm. (the code change that is)

Thanks again!
Last edited by yokel on June 6th, 2011, 6:11 am, edited 1 time in total.
yokel
Newbie
Newbie
 
Posts: 3
Joined: May 30th, 2011, 8:34 pm

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

Postby Pearf » January 15th, 2012, 2:38 pm

Hi,
this solution doesn't work for me. I'm on 0.5.4. Any suggestions?

Thanks
Pearf
Newbie
Newbie
 
Posts: 1
Joined: January 15th, 2012, 2:23 pm

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

Postby shypike » January 16th, 2012, 7:29 am

Upgrade?
User avatar
shypike
Administrator
Administrator
 
Posts: 16534
Joined: January 18th, 2008, 1:49 pm


Return to Bug Reports