From 386dac7735a38c023122adbda805dab12c716510 Mon Sep 17 00:00:00 2001 From: amtoaer Date: Tue, 5 Aug 2025 23:11:55 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E6=A0=BC=E5=BC=8F=E5=8C=96=E5=90=8E?= =?UTF-8?q?=E7=AB=AF=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/bili_sync/src/database.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/bili_sync/src/database.rs b/crates/bili_sync/src/database.rs index 6245537..6898e32 100644 --- a/crates/bili_sync/src/database.rs +++ b/crates/bili_sync/src/database.rs @@ -26,9 +26,9 @@ 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. Please check if you have granted necessary permissions to your folder.")?; + tokio::fs::create_dir_all(CONFIG_DIR.as_path()).await.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") }