mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-20 11:35:49 +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
1 changed files with 3 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue