summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2014-11-22 18:39:26 +0200
committerLars Wirzenius <liw@liw.fi>2014-11-22 18:39:26 +0200
commit46840a56dd8837576c22107ee615efc96df15747 (patch)
treeb14c76414dd870388e1734de4b13f2c2b2138ee0
parentdb443df0435113323c7e39b254aaf8769d44f6b3 (diff)
downloadjt-46840a56dd8837576c22107ee615efc96df15747.tar.gz
Use DraftsDir in AttachCommand
-rwxr-xr-xjt3
1 files changed, 2 insertions, 1 deletions
diff --git a/jt b/jt
index 757bcd4..37d21b1 100755
--- a/jt
+++ b/jt
@@ -113,7 +113,8 @@ class AttachCommand(Command):
if len(args) < 2:
raise cliapp.AppException('Usage: journal-note attach ID file...')
- filename = self._app.draft_name(args[0])
+ drafts_dir = DraftsDir(self._app.draft_dir())
+ filename = drafts_dir.get_draft_pathname(args[0])
dirname, ext = os.path.splitext(filename)
assert ext == '.mdwn'