fix: 修复通用脚本配置文件路径选择无法切换

This commit is contained in:
DLmaster361
2025-09-03 22:06:50 +08:00
parent f26d336195
commit 54e289ce56
4 changed files with 70 additions and 38 deletions

View File

@@ -134,7 +134,7 @@ class FileValidator(ConfigValidator):
def correct(self, value: Any) -> str:
if not isinstance(value, str):
value = "."
value = str(Path.cwd())
if not Path(value).is_absolute():
value = Path(value).resolve().as_posix()
if Path(value).suffix == ".lnk":
@@ -159,7 +159,7 @@ class FolderValidator(ConfigValidator):
def correct(self, value: Any) -> str:
if not isinstance(value, str):
value = "."
value = str(Path.cwd())
return Path(value).resolve().as_posix()