fix(database): add parent directory validation before database creation #1161

Merged
thesimplekid merged 1 commit from create_work_dir into main 2025-10-07 13:19:15 +00:00
thesimplekid commented 2025-10-07 11:13:30 +00:00 (Migrated from github.com)
  • Add work directory creation check in cdk-cli main
  • Add parent directory existence validation in cdk-redb wallet database
  • Add parent directory check in cdk-sqlite connection manager
  • Add IO error variant to cdk-redb error types for better error handling

Description


fixes https://github.com/cashubtc/cdk/issues/1160

Notes to the reviewers


Suggested CHANGELOG Updates

CHANGED

ADDED

REMOVED

FIXED


Checklist

- Add work directory creation check in cdk-cli main - Add parent directory existence validation in cdk-redb wallet database - Add parent directory check in cdk-sqlite connection manager - Add IO error variant to cdk-redb error types for better error handling ### Description <!-- Describe the purpose of this PR, what's being adding and/or fixed --> ----- fixes https://github.com/cashubtc/cdk/issues/1160 ### Notes to the reviewers <!-- In this section you can include notes directed to the reviewers, like explaining why some parts of the PR were done in a specific way --> ----- ### Suggested [CHANGELOG](https://github.com/cashubtc/cdk/blob/main/CHANGELOG.md) Updates <!-- Please do not edit the actual changelog but note what you changed here. --> #### CHANGED #### ADDED #### REMOVED #### FIXED ---- ### Checklist * [ ] I followed the [code style guidelines](https://github.com/cashubtc/cdk/blob/main/CODE_STYLE.md) * [ ] I ran `just final-check` before committing
cdk-bot commented 2025-10-28 16:58:56 +00:00 (Migrated from github.com)

Backport failed for v0.13.x, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin v0.13.x
git worktree add -d .worktree/backport-1161-to-v0.13.x origin/v0.13.x
cd .worktree/backport-1161-to-v0.13.x
git switch --create backport-1161-to-v0.13.x
git cherry-pick -x 6fe65553a309869f7c107847ef785abc4f96ae91
Backport failed for `v0.13.x`, because it was unable to cherry-pick the commit(s). Please cherry-pick the changes locally and resolve any conflicts. ```bash git fetch origin v0.13.x git worktree add -d .worktree/backport-1161-to-v0.13.x origin/v0.13.x cd .worktree/backport-1161-to-v0.13.x git switch --create backport-1161-to-v0.13.x git cherry-pick -x 6fe65553a309869f7c107847ef785abc4f96ae91 ```
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cashubtc/cdk!1161
No description provided.