Fixed a severe torrent matching bug caused by spaces not being unescaped when parsing

This commit is contained in:
Asmageddon 2012-05-27 01:19:44 +02:00
parent 2092a0d090
commit 00bf1d31a2
1 changed files with 4 additions and 1 deletions

View File

@ -163,7 +163,10 @@ class BaseCommand(object):
def split(self, text): def split(self, text):
if deluge.common.windows_check(): if deluge.common.windows_check():
text = text.replace('\\', '\\\\') text = text.replace('\\', '\\\\')
return re.split(r"(?<!\\) ", text) result = re.split(r"(?<!\\) ", text)
for i, s in enumerate(result):
result[i] = s.replace(r'\ ', ' ')
return result
def create_parser(self): def create_parser(self):
return OptionParser(prog = self.name, return OptionParser(prog = self.name,