mirror of
https://github.com/cnlimiter/codex-register.git
synced 2026-05-14 15:17:37 +08:00
fix(settings): 修复备份数据库时 pathlib.Path 与 fastapi.Path 命名冲突
This commit is contained in:
@@ -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)
|
||||
|
||||
# 生成备份文件名
|
||||
|
||||
Reference in New Issue
Block a user