[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] scratch/gnus-mock a26ba43 1/3: Create necessary empty maildir on
From: |
Eric Abrahamsen |
Subject: |
[elpa] scratch/gnus-mock a26ba43 1/3: Create necessary empty maildir on startup |
Date: |
Thu, 11 Oct 2018 14:11:08 -0400 (EDT) |
branch: scratch/gnus-mock
commit a26ba4380f66fe67a7dd7c09197a394c0d944741
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>
Create necessary empty maildir on startup
* packages/gnus-mock/gnus-mock.el (gnus-mock-start): Git won't commit
empty directories to the repository.
---
packages/gnus-mock/gnus-mock.el | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/packages/gnus-mock/gnus-mock.el b/packages/gnus-mock/gnus-mock.el
index cf28ac5..bbf4745 100644
--- a/packages/gnus-mock/gnus-mock.el
+++ b/packages/gnus-mock/gnus-mock.el
@@ -169,6 +169,15 @@ gnus-directory \"%s\"
(copy-directory
gnus-mock-data-dir
(file-name-as-directory mock-tmp-dir) nil nil t)
+ ;; Git doesn't let us commit empty directories, so create our
+ ;; necessary empty maildir bits.
+ (mapc (lambda (path) (make-directory path t))
+ (mapcar (lambda (dir)
+ (format "%s/test/%s" mock-tmp-dir dir))
+ '("Welcome/new" "Welcome/tmp" "Welcome/.nnmaildir/marks"
+ "incoming/tmp" "incoming/new" "incoming/cur"
+ "incoming/.nnmaildir/marks" "incoming/.nnmaildir/nov"
+ "mails/tmp" "mails/new" "mails/.nnmaildir/marks")))
;; Possibly insert additional config.
(when gnus-mock-init-file
(with-temp-buffer