diff --git a/autoreply_editor/main.py b/autoreply_editor/main.py index 9ca639a..baeec3c 100644 --- a/autoreply_editor/main.py +++ b/autoreply_editor/main.py @@ -62,7 +62,13 @@ def check_user(user): def get_messagefile(user): """Return message file of user, and create if necessary""" - filepath = f"message-{user}.txt" + # Path of the project + gitpath = str(Path(app.root_path).parent) + # File name of the message + filename = f"message-{user}.txt" + # Combine path + filepath = os.path.join(gitpath, filename) + if not os.path.isfile(filepath): Path(filepath).touch()