Merge pull request #61 from alapolloni/master

Update jrnl.py so that a trailing / for a DayOne journal config is seen as a DayOne journal.
This commit is contained in:
Manuel Ebert 2013-04-17 01:32:56 -07:00
commit 36fe783e5e

View file

@ -161,7 +161,10 @@ def cli():
mode_compose, mode_export = guess_mode(args, config)
# open journal file or folder
if os.path.isdir(config['journal']) and config['journal'].endswith(".dayone"):
if os.path.isdir(config['journal']) and ( config['journal'].endswith(".dayone") or \
config['journal'].endswith(".dayone/")):
journal = Journal.DayOne(**config)
else:
journal = Journal.Journal(**config)