mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-07-03 07:16:12 +02:00
Always expand all paths (journals, templates, etc) (#1468)
* Refactored path expansion calls into a new path.py file This also fixed bugs with relative journal and template paths. * Update tests for new path functions Also, make the tests specific to Windows, Mac & Linux Co-authored-by: Jonathan Wren <jonathan@nowandwren.com> Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
This commit is contained in:
parent
1ce7ce8bfc
commit
ea6df4705c
9 changed files with 172 additions and 21 deletions
|
@ -11,6 +11,7 @@ import sys
|
|||
from . import Entry
|
||||
from . import time
|
||||
from .prompt import yesno
|
||||
from .path import expand_path
|
||||
|
||||
|
||||
class Tag:
|
||||
|
@ -410,7 +411,7 @@ def open_journal(journal_name, config, legacy=False):
|
|||
backwards compatibility with jrnl 1.x
|
||||
"""
|
||||
config = config.copy()
|
||||
config["journal"] = os.path.expanduser(os.path.expandvars(config["journal"]))
|
||||
config["journal"] = expand_path(config["journal"])
|
||||
|
||||
if os.path.isdir(config["journal"]):
|
||||
if config["encrypt"]:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue