From d7391611dd58d231d5f293d7085a1b327e22f94e Mon Sep 17 00:00:00 2001 From: Asmageddon Date: Sat, 26 May 2012 20:02:08 +0200 Subject: [PATCH] Do not use shlex for splitting as it breaks on torrents containing quotes --- deluge/ui/console/main.py | 4 ++-- deluge/ui/console/modes/legacy.py | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/deluge/ui/console/main.py b/deluge/ui/console/main.py index 01db19213..9aa5db10d 100644 --- a/deluge/ui/console/main.py +++ b/deluge/ui/console/main.py @@ -38,7 +38,7 @@ import os import sys import logging import optparse -import shlex +import re import locale from twisted.internet import defer, reactor @@ -163,7 +163,7 @@ class BaseCommand(object): def split(self, text): if deluge.common.windows_check(): text = text.replace('\\', '\\\\') - return shlex.split(text) + return re.split(r"(?