mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-14 05:26:28 +00:00
Escape spaces in paths in legacy mode 'add' command. This also makes backslashes unsupported(but you're a bad person for having them in paths anyway)
This commit is contained in:
parent
a24c679510
commit
8819ec0575
@ -99,6 +99,7 @@ class Command(BaseCommand):
|
|||||||
return defer.DeferredList(deferreds)
|
return defer.DeferredList(deferreds)
|
||||||
|
|
||||||
def complete(self, line):
|
def complete(self, line):
|
||||||
|
line = line.replace("\ ", " ")
|
||||||
line = os.path.abspath(os.path.expanduser(line))
|
line = os.path.abspath(os.path.expanduser(line))
|
||||||
ret = []
|
ret = []
|
||||||
if os.path.exists(line):
|
if os.path.exists(line):
|
||||||
@ -132,5 +133,6 @@ class Command(BaseCommand):
|
|||||||
if os.path.isdir(p):
|
if os.path.isdir(p):
|
||||||
p += "/"
|
p += "/"
|
||||||
ret.append(p)
|
ret.append(p)
|
||||||
|
for i in range(0, len(ret)):
|
||||||
|
ret[i] = ret[i].replace(" ", r"\ ")
|
||||||
return ret
|
return ret
|
||||||
|
Loading…
x
Reference in New Issue
Block a user