0.6.2: double quotes not removed from directory name.

Report & discuss bugs found in 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
yokel
Newbie
Newbie
Posts: 3
Joined: May 30th, 2011, 7:34 pm

0.6.2: double quotes not removed from directory name.

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

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

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

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

Post by yokel »

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

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

Post by yokel »

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

Thanks again!
Last edited by yokel on June 6th, 2011, 5:11 am, edited 1 time in total.
Pearf
Newbie
Newbie
Posts: 1
Joined: January 15th, 2012, 1:23 pm

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

Post by Pearf »

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

Thanks
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

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

Post by shypike »

Upgrade?
Post Reply