windows下可以修改配置文件目录的位置

This commit is contained in:
xzb23 committed 2026-11-22 22:13:42 +08:00
1 parent 4765499f64
commit 7c41a9e2fd
2 files changed
+7 -2

No files matched your search

+2 -1
View File
@@ -7,4 +7,5 @@ build
/.venv
/.vscode
/conf.d
/test.py
/test.py
conf.dir
+5 -1
View File
@@ -26,7 +26,11 @@ def get_config(config_key: str):
else:
configdir_path = "/etc/check_duplicate_files/"
case "Windows":
configdir_path = config.exe_dir + "conf.d/"
if os.path.isfile(config.exe_dir + "conf.dir"):
with open(config.exe_dir + "conf.dir") as cpf:
configdir_path = cpf.read().strip()
else:
configdir_path = config.exe_dir + "conf.d/"
config.configdir_path = formatting_path(configdir_path)
config_path = config.configdir_path + config_key
if not (os.path.isfile(config_path)):