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

Print database path in errors #73

Closed
TimoFreiberg opened this issue May 16, 2020 · 4 comments
Closed

Print database path in errors #73

TimoFreiberg opened this issue May 16, 2020 · 4 comments

Comments

@TimoFreiberg
Copy link

I had zoxide 0.1.1 installed and encountered the database corruption issue described in #68.
I installed the new version and received the following error message:

Error: could not deserialize old database

Caused by:
    io error: failed to fill whole buffer

I think zoxide should document the default database locations and also print the database file path when it can't be read.

@ajeetdsouza
Copy link
Owner

ajeetdsouza commented May 16, 2020

That's a valid point, I've been looking into this too. It is documented in the README under _ZO_DATA_DIR, but I suppose it isn't very noticeable. The database location is decided by this function.

@TimoFreiberg
Copy link
Author

I found that but it didn't help me in my case, the file I had to delete was ~/.zo, which I only found out via #68 :)

@TimoFreiberg
Copy link
Author

Looking at the current master, the specific failure I encountered is no longer there and I didn't find any places where the path was missing from context calls at a cursory glance, so I think this can be closed

@ajeetdsouza
Copy link
Owner

@TimoFreiberg yes, I've been working on improving zoxide's error messages. Hopefully, such confusions will not happen in future!

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