mirror of
https://github.com/GothenburgBitFactory/taskchampion-sync-server.git
synced 2025-06-26 10:54:29 +02:00
Provide more context on mkdir failures (#28)
For example, instead of: ``` Error: Permission denied (os error 13) ``` one will get: ``` Error: Failed to create `/var/lib/taskchampion-sync-server`. Caused by: Permission denied (os error 13) ``` after this patch is applied.
This commit is contained in:
parent
f23eea1928
commit
bfcb0e675e
1 changed files with 2 additions and 1 deletions
|
@ -42,7 +42,8 @@ impl SqliteStorage {
|
|||
}
|
||||
|
||||
pub fn new<P: AsRef<Path>>(directory: P) -> anyhow::Result<SqliteStorage> {
|
||||
std::fs::create_dir_all(&directory)?;
|
||||
std::fs::create_dir_all(&directory)
|
||||
.with_context(|| format!("Failed to create `{}`.", directory.as_ref().display()))?;
|
||||
let db_file = directory.as_ref().join("taskchampion-sync-server.sqlite3");
|
||||
|
||||
let o = SqliteStorage { db_file };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue