tursodatabase / libsql-client-py

Python SDK for libSQL

Home Page:https://libsql.org/libsql-client-py/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

URL decode path for files

penberg opened this issue · comments

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.

Hi! I would like to work on this issue as my first contribution. Can I go ahead?

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

@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.