Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: app breaks when trying to open a connection with no / #41

Closed
xjojorx opened this issue Mar 10, 2024 · 1 comment
Closed

bug: app breaks when trying to open a connection with no / #41

xjojorx opened this issue Mar 10, 2024 · 1 comment

Comments

@xjojorx
Copy link

xjojorx commented Mar 10, 2024

This looks like a simple bug, i downloaded lazysql to try it via go install, and added my local sqlite db to try it.
I added it with a relative path for url on the connection and the "test connection" show it was correct.
I saved and returned to the home screen and selected the db and lazysql panicked.
image

I tried setting the URL as "./data.db" instead and it works that way.

Already took a look at the code on the line shown in the error and i figured it really expects to have at least on '/', this is the line:

return strings.Split(url, "/")[1]

I figure it should at least just use the whole string if there are no slashes to be found in the path.

I may go and submit a PR with it myself later, but I thought I should at least create an issue even if just documenting the problem in case I forget to go and fix it myself.

@jorgerojas26
Copy link
Owner

This has been resolved in #43

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants