Don't hand file:// URLs to KGet

Ctrl+S on a page you navigated to directly via file:// is still a
"download" as far as chrome.downloads is concerned, so auto-capture
was intercepting it and handing the local path to KGet, which
rejects it with a confusing "protocol is not supported" dialog since
it's a network download manager, not a file copier. Extend the
existing blob:/data: exclusion to also cover file:/filesystem:, and
apply the same guard to the right-click capture path.
This commit is contained in:
2026-08-12 12:11:03 +03:00
parent 235c377361
commit a2cd4184e3
3 changed files with 24 additions and 6 deletions
+5 -3
View File
@@ -83,9 +83,11 @@ git push origin v1.0.0
## Known limitations
- **`blob:`/`data:` URLs can't be captured.** There's no real network URL to
hand to KGet, so these downloads proceed normally through Chrome (a console
warning is logged in the extension's service worker).
- **`blob:`/`data:`/`file:`/`filesystem:` URLs can't be captured.** There's
no real network URL to hand to KGet — this includes saving a page you
navigated to directly via `file://` (Ctrl+S on it is still a "download" as
far as Chrome is concerned) — so these downloads proceed normally through
Chrome (a console warning is logged in the extension's service worker).
- **Auto-capture has a brief head start.** Manifest V3 removed blocking
`webRequest`, so Chrome begins the download before the extension can cancel
it. A small/partial temp file may transiently appear before it's erased.