aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2021-06-10 14:59:41 -0400
committerKyle Meyer <kyle@kyleam.com>2021-06-11 13:36:54 -0400
commit8e5d8aead8ffb2a9f30bf0b779a65d87fd9ad9e6 (patch)
tree5108255a9ab123b7c25c1463211bb5abc4244539
parenta4daee07bef2c9e4bd230da132605a59c8dbd2f0 (diff)
downloadpiem-8e5d8aead8ffb2a9f30bf0b779a65d87fd9ad9e6.tar.gz
piem-inbox-coderepo*: Always return coderepo as a directory
A coderepo is by definition a directory. Append a trailing separator so that callers don't have to worry about normalizing it. Message-Id: <20210610185943.14155-3-kyle@kyleam.com>
-rw-r--r--piem.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/piem.el b/piem.el
index 0efae9e..6546615 100644
--- a/piem.el
+++ b/piem.el
@@ -376,7 +376,7 @@ If INBOX is nil, use the inbox returned by `piem-inbox'."
(defun piem-inbox-coderepo (&optional inbox)
"Return the code repository of current buffer's inbox."
(when-let ((repo (piem-inbox-get :coderepo inbox)))
- (expand-file-name repo)))
+ (file-name-as-directory (expand-file-name repo))))
(defun piem-inbox-maildir-directory (&optional inbox)
"Return the maildir for INBOX's entry in `piem-inboxes'.
@@ -421,7 +421,7 @@ INBOX doesn't have a maildir configured, return the value of
(read-directory-name "Git repository: "))))
(if (equal repo "")
(user-error "No code repository specified")
- repo)))
+ (file-name-as-directory repo))))
(defun piem-mid ()
"Return the current buffer's message ID."