Unquote paths from file:// URLs

The original iTerm spec for this says the urls are supposed to be
percent escaped
This commit is contained in:
Kovid Goyal 2022-03-15 21:07:36 +05:30
parent c95dca4023
commit a834f221f1
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -942,6 +942,6 @@ def path_from_osc7_url(url: str) -> str:
if url.startswith('kitty-shell-cwd://'):
return '/' + url.split('/', 3)[-1]
if url.startswith('file://'):
from urllib.parse import urlparse
return urlparse(url).path
from urllib.parse import urlparse, unquote
return unquote(urlparse(url).path)
return ''