diff options
author | Nao Pross <np@0hm.ch> | 2020-12-24 17:16:15 +0100 |
---|---|---|
committer | Nao Pross <np@0hm.ch> | 2020-12-24 17:16:15 +0100 |
commit | 74fa37d37fc6c68d5f39efb4ca4649999c15b0e9 (patch) | |
tree | 3bcf668b378482e996fdf142f17ca746085fde8d | |
parent | Fix typo in README (diff) | |
download | Muddle-74fa37d37fc6c68d5f39efb4ca4649999c15b0e9.tar.gz Muddle-74fa37d37fc6c68d5f39efb4ca4649999c15b0e9.zip |
Add Windows path for config and log files
Diffstat (limited to '')
-rw-r--r-- | muddle.py | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -72,8 +72,14 @@ if platform.system() == "Linux": elif pathlib.Path("~/.cache").expanduser().exists(): default_log_dir = pathlib.Path("~/.cache/muddle/").expanduser() +elif platform.system() == "Windows": + if os.environ.get("APPDATA"): + default_config_dir = pathlib.Path(os.environ["APPDATA"]).joinpath("muddle/") -# TODO: implement for other platforms + if os.environ.get("LOCALAPPDATA"): + default_log_dir = pathlib.Path(os.environ["LOCALAPPDATA"]).joinpath("muddle") + +# TODO: implement for MacOS default_config_file = default_config_dir.joinpath("muddle.ini") default_log_file = default_log_dir.joinpath("muddle.log") |