diff --git a/qutebrowser/mainwindow/prompt.py b/qutebrowser/mainwindow/prompt.py index ff676146d..2f833c3a3 100644 --- a/qutebrowser/mainwindow/prompt.py +++ b/qutebrowser/mainwindow/prompt.py @@ -665,6 +665,7 @@ class FilenamePrompt(_BasePrompt): return path def _show_error(self, msg): + log.prompt.error(msg) QToolTip.showText(self._lineedit.mapToGlobal(QPoint(0, 0)), msg) def accept(self, value=None): diff --git a/tests/end2end/features/downloads.feature b/tests/end2end/features/downloads.feature index 444cf8721..b47edf8d8 100644 --- a/tests/end2end/features/downloads.feature +++ b/tests/end2end/features/downloads.feature @@ -126,6 +126,20 @@ Feature: Downloading things from a website. Then the downloaded file ../foo should not exist And the downloaded file foo should exist + @windows + Scenario: Downloading a file to a reserved path + When I open data/downloads/download.bin + And I run :prompt-accept COM1 + And I run :prompt-cancel + Then "Invalid filename" should be logged + + @windows + Scenario: Downloading a file to a drive-relative working directory + When I open data/downloads/download.bin + And I run :prompt-accept C:foobar + And I run :prompt-cancel + Then "Invalid filename" should be logged + ## :download-retry Scenario: Retrying a failed download