From ce3b5e3d1d31c58885c040cf0a963aebe63f1b9b Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sat, 22 Nov 2014 18:40:35 +0200 Subject: Use DraftsDir in RemoveCommand --- jt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/jt b/jt index 37d21b1..cd47821 100755 --- a/jt +++ b/jt @@ -113,7 +113,7 @@ class AttachCommand(Command): if len(args) < 2: raise cliapp.AppException('Usage: journal-note attach ID file...') - drafts_dir = DraftsDir(self._app.draft_dir()) + drafts_dir = DraftsDirectory(self._app.draft_dir()) filename = drafts_dir.get_draft_pathname(args[0]) dirname, ext = os.path.splitext(filename) @@ -131,7 +131,8 @@ class RemoveCommand(Command): if not args: raise cliapp.AppException('Usage: journal-note remove ID') - filename = self._app.draft_name(args[0]) + drafts_dir = DraftsDirectory(self._app.drafts_dir()) + filename = drafts_dir.get_draft_pathname(args[0]) os.remove(filename) dirname, ext = os.path.splitext(filename) -- cgit v1.2.1