Handle empty path for file completion
This also allows us to select drives on Windows hopefully...
This commit is contained in:
parent
cbf1a44b75
commit
732e7c260b
@ -550,13 +550,12 @@ class FilenamePrompt(_BasePrompt):
|
||||
if os.altsep is not None:
|
||||
separators += os.altsep
|
||||
|
||||
if not path:
|
||||
return
|
||||
|
||||
dirname = os.path.dirname(path)
|
||||
|
||||
try:
|
||||
if path in separators and os.path.isdir(path):
|
||||
if not path:
|
||||
pass
|
||||
elif path in separators and os.path.isdir(path):
|
||||
# Input "/" -> don't strip anything
|
||||
pass
|
||||
elif path[-1] in separators and os.path.isdir(path):
|
||||
|
Loading…
Reference in New Issue
Block a user