From c08d3a9fabfbdb522dfd803a2146144ecb4ae879 Mon Sep 17 00:00:00 2001 From: Zuckerberg Date: Tue, 3 May 2022 14:51:49 -0400 Subject: [PATCH] Don't create drastikbot config directory in user's home --- .gitignore | 1 + src/drastikbot.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4ae49ba --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +drastikbot diff --git a/src/drastikbot.py b/src/drastikbot.py index 31278f8..887790a 100755 --- a/src/drastikbot.py +++ b/src/drastikbot.py @@ -74,13 +74,13 @@ def parser(): " already exists.") conf_dir = str(path.expanduser().resolve()) else: - path = Path('~/.drastikbot').expanduser() + path = Path('./drastikbot').expanduser() if not path.is_dir(): try: path.mkdir(parents=True, exist_ok=False) except FileExistsError: sys.exit("[Error] Making configuration directory at" - " '~/.drastikbot' failed. Another file with that name" + " './drastikbot' failed. Another file with that name" " already exists.") conf_dir = str(path)