diff --git a/.gitignore b/.gitignore index df52134..c525788 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,5 @@ build /.venv /.vscode /conf.d -/test.py \ No newline at end of file +/test.py +conf.dir \ No newline at end of file diff --git a/common.py b/common.py index df12f8d..a9cdaf4 100644 --- a/common.py +++ b/common.py @@ -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)):