We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1bce26c commit 9ada1f6Copy full SHA for 9ada1f6
1 file changed
src/web/routes/settings.py
@@ -290,8 +290,8 @@ async def backup_database():
290
raise HTTPException(status_code=404, detail="数据库文件不存在")
291
292
# 创建备份目录
293
- from fastapi import Path
294
- backup_dir = Path(db_path).parent / "backups"
+ from pathlib import Path as FilePath
+ backup_dir = FilePath(db_path).parent / "backups"
295
backup_dir.mkdir(exist_ok=True)
296
297
# 生成备份文件名
0 commit comments