Create journal with absolute path when no path is specified (#972)

* create jrnl with abspath

Co-authored-by: = <esrh@netc.eu>
This commit is contained in:
eshrh 2020-06-13 14:08:22 -04:00 committed by GitHub
parent d9951b54c0
commit 2a3fd820b9
4 changed files with 21 additions and 2 deletions

View file

@ -135,7 +135,7 @@ def install():
# Where to create the journal?
path_query = f"Path to your journal file (leave blank for {JOURNAL_FILE_PATH}): "
journal_path = input(path_query).strip() or JOURNAL_FILE_PATH
journal_path = os.path.abspath(input(path_query).strip() or JOURNAL_FILE_PATH)
default_config["journals"][DEFAULT_JOURNAL_KEY] = os.path.expanduser(
os.path.expandvars(journal_path)
)