From 9ada1f6ec69caae9459d14ebd97439741a591ba8 Mon Sep 17 00:00:00 2001 From: cnlimiter Date: Fri, 20 Mar 2026 13:49:17 +0800 Subject: [PATCH] =?UTF-8?q?fix(settings):=20=E4=BF=AE=E5=A4=8D=E5=A4=87?= =?UTF-8?q?=E4=BB=BD=E6=95=B0=E6=8D=AE=E5=BA=93=E6=97=B6=20pathlib.Path=20?= =?UTF-8?q?=E4=B8=8E=20fastapi.Path=20=E5=91=BD=E5=90=8D=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/web/routes/settings.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/web/routes/settings.py b/src/web/routes/settings.py index cca7c50..d096fa4 100644 --- a/src/web/routes/settings.py +++ b/src/web/routes/settings.py @@ -290,8 +290,8 @@ async def backup_database(): raise HTTPException(status_code=404, detail="数据库文件不存在") # 创建备份目录 - from fastapi import Path - backup_dir = Path(db_path).parent / "backups" + from pathlib import Path as FilePath + backup_dir = FilePath(db_path).parent / "backups" backup_dir.mkdir(exist_ok=True) # 生成备份文件名