From 5537c621be474bc4e20c3f15454bed397a0c4b35 Mon Sep 17 00:00:00 2001 From: Xinyu Bao <34500975+AspadaX@users.noreply.github.com> Date: Tue, 5 Aug 2025 23:11:11 +0800 Subject: [PATCH] Add error messages for the case in which the database initialization fails (#415) --- crates/bili_sync/src/database.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/bili_sync/src/database.rs b/crates/bili_sync/src/database.rs index f69345b..6245537 100644 --- a/crates/bili_sync/src/database.rs +++ b/crates/bili_sync/src/database.rs @@ -28,7 +28,7 @@ async fn migrate_database() -> Result<()> { pub async fn setup_database() -> Result { tokio::fs::create_dir_all(CONFIG_DIR.as_path()) .await - .context("Failed to create config directory")?; + .context("Failed to create config directory. Please check if you have granted necessary permissions to your folder.")?; migrate_database().await.context("Failed to migrate database")?; database_connection().await.context("Failed to connect to database") }