mirror of
https://github.com/xzb23/check_duplicate_files.git
synced 2026-11-24 10:25:26 +08:00
windows下可以修改配置文件目录的位置
This commit is contained in:
2 files changed
+7
-2
No files matched your search
+2
-1
@@ -7,4 +7,5 @@ build
|
||||
/.venv
|
||||
/.vscode
|
||||
/conf.d
|
||||
/test.py
|
||||
/test.py
|
||||
conf.dir
|
||||
@@ -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)):
|
||||
|
||||
Reference in new issue
Block a user