Some small fixes and improvements, update dependencies#69
Open
rustybee42 wants to merge 3 commits intomainfrom
Open
Some small fixes and improvements, update dependencies#69rustybee42 wants to merge 3 commits intomainfrom
rustybee42 wants to merge 3 commits intomainfrom
Conversation
iamjoemccormick
previously approved these changes
Apr 21, 2026
| .ok_or_else(|| anyhow!("File does not have a parent folder"))?, | ||
| )?; | ||
| std::fs::File::create_new(db_file)?; | ||
| conn.backup(rusqlite::MAIN_DB, db_file, None)?; |
Member
There was a problem hiding this comment.
nitpick: if conn.backup fails we leave an orphaned empty file that would require the user to manually cleanup before they could run --init again. It would be nice to cleanup on error.
That said I'm not really worried about it, most likely an error from conn.backup() probably indicates I/O or file system errors (e.g., disk full), which are fairly unlikely if we were just able to create the file.
Collaborator
Author
There was a problem hiding this comment.
Yeah, that's right. Not a big deal, but added it anyway as I couldn't merge the PR without resolving the security advisory.
b9749f5 to
da27d12
Compare
This gives a more detailed os error on failure compared to the generic sqlite one and should point the user to the cause of the failure (e.g. "permission denied"). The used function also fails if the file exists, so the explicit check can be removed.
da27d12 to
a8c4d6c
Compare
Collaborator
Author
|
I now also updated all the dependencies to get rid of the security advisory and also improved/fixed some of the config descriptions. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See commits.
Closes #67, #70