mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-08 09:28:41 +00:00
Implement a call to os.sep in regards to auto completion
Added small amount of code which calls os.sep so we know if we should append "/" or "\\" to the end of a dir.
This commit is contained in:
parent
f33a6a68e4
commit
98101ea411
1 changed files with 8 additions and 2 deletions
|
@ -113,6 +113,9 @@ class Command(BaseCommand):
|
||||||
continue
|
continue
|
||||||
f = os.path.join(line, f)
|
f = os.path.join(line, f)
|
||||||
if os.path.isdir(f):
|
if os.path.isdir(f):
|
||||||
|
if os.sep == '\\': # Windows path support :|
|
||||||
|
f += "\\"
|
||||||
|
else: # \o/ Unix
|
||||||
f += "/"
|
f += "/"
|
||||||
ret.append(f)
|
ret.append(f)
|
||||||
else:
|
else:
|
||||||
|
@ -131,6 +134,9 @@ class Command(BaseCommand):
|
||||||
p = os.path.join(os.path.dirname(line), f)
|
p = os.path.join(os.path.dirname(line), f)
|
||||||
|
|
||||||
if os.path.isdir(p):
|
if os.path.isdir(p):
|
||||||
|
if os.sep == '\\': # Windows path support :|
|
||||||
|
p += "\\"
|
||||||
|
else: # \o/ Unix
|
||||||
p += "/"
|
p += "/"
|
||||||
ret.append(p)
|
ret.append(p)
|
||||||
for i in range(0, len(ret)):
|
for i in range(0, len(ret)):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue