Re: wanderlust file name too long

Kazuhiro Ito <[email protected]>
Newsgroups gmane.mail.wanderlust.general.japanese
Message-ID <[email protected]>
> I have an email in my inbox that I cannot open. It says "Creating
> directory: File name too long, /home/tomas/.elmo/cache/10/..."
> 
> Do you have any idea how to fix this, or where the in the code to
> look?

Wanderlust builds cache filename from message-id.  If message-id is
too long, filename may be too long.  As a workaround, using hash
function can avoid the problem.  Please try the below code.

;; Adjust according to your environment.
(defvar elmo-msgid-to-chace-max-length 128)

(eval-after-load "elmo-util"
  '(defun elmo-msgid-to-cache (msgid)
     (save-match-data
       (when (and msgid
                  (string-match "<\\(.+\\)>$" msgid))
         (let ((result (elmo-replace-string-as-filename
                        (match-string 1 msgid))))
           (if (or (null elmo-msgid-to-chace-max-length)
                   (<= (length result) elmo-msgid-to-chace-max-length))
               result
             (sha1 msgid)))))))

-- 
Kazuhiro Ito
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.