URL decode path for files
penberg opened this issue · comments
Pekka Enberg commented
We currently don't support paths that have URL encoded spaces, for example:
file:///foo/bar%20baz/sqlite.db
Let's decode the URL before passing using it for path lookup.
Adithya Haniyamballi commented
Hi! I would like to work on this issue as my first contribution. Can I go ahead?
Pekka Enberg commented
@gh-adithya Go for it!
Adithya Haniyamballi commented
If I'm not wrong, this issue must have been resolved already. The relevant lines of code are:
url_parsed = urllib.parse.urlparse(url)
scheme = url_parsed.scheme
authority = url_parsed.netloc
path = url_parsed.path
This is from lines 21-24 in config.py
Pekka Enberg commented
@gh-adithya The path
is still in the encoded format. You can test this yourself by trying to open a file with a space in the name in encoded format as shown above.