feat: 优化学习视频转写与字幕清洗
This commit is contained in:
@@ -218,7 +218,10 @@ def list_batch_roots() -> list[dict]:
|
||||
roots.append({"path": str(drive), "name": f"{letter}:\\"})
|
||||
else:
|
||||
roots.append({"path": "/", "name": "/"})
|
||||
home = Path.home()
|
||||
# 用环境变量解析家目录,避免测试模拟 Windows 分支时在 POSIX 进程中
|
||||
# 调用 Path.home() 触发 WindowsPath 的平台不匹配异常。
|
||||
home_value = os.environ.get("USERPROFILE") or os.environ.get("HOME")
|
||||
home = Path(home_value).expanduser() if home_value else Path.home()
|
||||
roots.append({"path": str(home), "name": f"家目录({home.name})"})
|
||||
return roots
|
||||
|
||||
|
||||
Reference in New Issue
Block a user