mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-13 13:05:37 +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)
|
||||
|
||||
def complete(self, line):
|
||||
line = line.replace("\ ", " ")
|
||||
line = os.path.abspath(os.path.expanduser(line))
|
||||
ret = []
|
||||
if os.path.exists(line):
|
||||
@ -132,5 +133,6 @@ class Command(BaseCommand):
|
||||
if os.path.isdir(p):
|
||||
p += "/"
|
||||
ret.append(p)
|
||||
|
||||
for i in range(0, len(ret)):
|
||||
ret[i] = ret[i].replace(" ", r"\ ")
|
||||
return ret
|
||||
|
Loading…
x
Reference in New Issue
Block a user