mirror of
https://github.com/amtoaer/bili-sync.git
synced 2026-09-05 15:39:07 +08:00
fix: 修复本地测试发现的若干问题 (#392)
This commit is contained in:
@@ -26,6 +26,9 @@ async fn migrate_database() -> Result<()> {
|
||||
|
||||
/// 进行数据库迁移并获取数据库连接,供外部使用
|
||||
pub async fn setup_database() -> Result<DatabaseConnection> {
|
||||
tokio::fs::create_dir_all(CONFIG_DIR.as_path())
|
||||
.await
|
||||
.context("Failed to create config directory")?;
|
||||
migrate_database().await.context("Failed to migrate database")?;
|
||||
database_connection().await.context("Failed to connect to database")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user