From 732e7c260b13f7b171b530a698a0ec9e9cd35f39 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Wed, 2 Nov 2016 23:11:16 +0100 Subject: [PATCH] Handle empty path for file completion This also allows us to select drives on Windows hopefully... --- qutebrowser/mainwindow/prompt.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/qutebrowser/mainwindow/prompt.py b/qutebrowser/mainwindow/prompt.py index 5e686a375..283af269d 100644 --- a/qutebrowser/mainwindow/prompt.py +++ b/qutebrowser/mainwindow/prompt.py @@ -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):