From e0b4a71bf241d6faaa46bea58a4688f1e9c932b8 Mon Sep 17 00:00:00 2001 From: James Thomas Date: Sun, 3 Mar 2024 06:58:49 +0530 Subject: [PATCH] Make gnus cache work with group names having '/' Replace the incorrect `gnus-use-long-file-name` with `nnmail-use-long-file-names`. * lisp/gnus/gnus-cache.el (gnus-cache-file-name): --- lisp/gnus/gnus-cache.el | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/lisp/gnus/gnus-cache.el b/lisp/gnus/gnus-cache.el index 961219eee8f..d174ee9a9f4 100644 --- a/lisp/gnus/gnus-cache.el +++ b/lisp/gnus/gnus-cache.el @@ -448,16 +448,12 @@ gnus-cache-file-name (file-name-as-directory (expand-file-name (nnheader-translate-file-chars - (if (gnus-use-long-file-name 'not-cache) - group - (let ((group (nnheader-replace-duplicate-chars-in-string - (nnheader-replace-chars-in-string group ?/ ?_) - ?. ?_))) - ;; Translate the first colon into a slash. - (when (string-match ":" group) - (setq group (concat (substring group 0 (match-beginning 0)) - "/" (substring group (match-end 0))))) - (nnheader-replace-chars-in-string group ?. ?/))) + (let ((group (nnheader-replace-duplicate-chars-in-string + (nnheader-replace-chars-in-string group ?/ ?_) + ?. ?_))) + (if (not nnmail-use-long-file-names) + (nnheader-replace-chars-in-string group ?. ?/) + group)) t) gnus-cache-directory)))) -- 2.34.1