mirror of
https://github.com/codex-storage/deluge.git
synced 2025-02-11 19:06:56 +00:00
Fix #1143 deluge-console crashes when autocompleting non-existing
directory
This commit is contained in:
parent
5bbe8bec5c
commit
4a7782af28
@ -105,6 +105,7 @@ class Command(BaseCommand):
|
|||||||
# This path does not exist, so lets do a listdir on it's parent
|
# This path does not exist, so lets do a listdir on it's parent
|
||||||
# and find any matches.
|
# and find any matches.
|
||||||
ret = []
|
ret = []
|
||||||
|
if os.path.isdir(os.path.dirname(line)):
|
||||||
for f in os.listdir(os.path.dirname(line)):
|
for f in os.listdir(os.path.dirname(line)):
|
||||||
if f.startswith(os.path.split(line)[1]):
|
if f.startswith(os.path.split(line)[1]):
|
||||||
p = os.path.join(os.path.dirname(line), f)
|
p = os.path.join(os.path.dirname(line), f)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user