When moving issues, create target directories if they do not already exist.

This commit is contained in:
Jonathan Bernard 2020-07-06 11:47:31 -05:00
parent 08b9df2086
commit 520833d703
3 changed files with 3 additions and 2 deletions

View File

@ -1,6 +1,6 @@
# Package # Package
version = "4.9.1" version = "4.9.2"
author = "Jonathan Bernard" author = "Jonathan Bernard"
description = "Personal issue tracker." description = "Personal issue tracker."
license = "MIT" license = "MIT"

View File

@ -170,6 +170,7 @@ proc loadIssueById*(tasksDir, id: string): Issue =
raise newException(KeyError, "cannot find issue for id: " & id) raise newException(KeyError, "cannot find issue for id: " & id)
proc store*(issue: Issue, withComments = false) = proc store*(issue: Issue, withComments = false) =
discard existsOrCreateDir(issue.filePath.parentDir)
writeFile(issue.filepath, toStorageFormat(issue, withComments)) writeFile(issue.filepath, toStorageFormat(issue, withComments))
proc store*(tasksDir: string, issue: Issue, state: IssueState, withComments = false) = proc store*(tasksDir: string, issue: Issue, state: IssueState, withComments = false) =

View File

@ -1 +1 @@
const PIT_VERSION* = "4.9.1" const PIT_VERSION* = "4.9.2"