From 06e664d78a506aaf222b11ac2c61fa9c36ba8493 Mon Sep 17 00:00:00 2001 From: Alex Apolloni Date: Mon, 15 Apr 2013 14:05:04 +0200 Subject: [PATCH] allow trailing \ for DayOne journals https://github.com/maebert/jrnl#dayone-integration sort of infers that it in the .jrnl_config it should end in a / but prior to this, if there was a trailing / then jrnl thought it was looking at a text type journal. --- jrnl/jrnl.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jrnl/jrnl.py b/jrnl/jrnl.py index 2de3fd16..74520f3a 100755 --- a/jrnl/jrnl.py +++ b/jrnl/jrnl.py @@ -159,7 +159,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)