From 8f07f4736ce4cec01d3c714eb701fd471bc441cb Mon Sep 17 00:00:00 2001 From: yamaoka Date: Fri, 23 Jan 2004 07:49:48 +0000 Subject: [PATCH] Synch to No Gnus 200401230745. --- contrib/starttls.el | 4 ++-- lisp/ChangeLog | 5 +++++ lisp/nnmaildir.el | 36 ++++++++++++++++++++---------------- 3 files changed, 27 insertions(+), 18 deletions(-) diff --git a/contrib/starttls.el b/contrib/starttls.el index 95db27f..e34a671 100644 --- a/contrib/starttls.el +++ b/contrib/starttls.el @@ -1,6 +1,6 @@ ;;; starttls.el --- STARTTLS support via wrapper around GNU TLS -;; Copyright (C) 2003 Free Software Foundation, Inc. +;; Copyright (C) 2003, 2004 Free Software Foundation, Inc. ;; Author: Simon Josefsson ;; Keywords: comm, tls, gnutls, ssl @@ -123,7 +123,7 @@ The default is what GNUTLS's \"gnutls-cli\" outputs." :type 'regexp :group 'starttls) -(defcustom starttls-failure "*** Handshake has failed" +(defcustom starttls-failure "\\*\\*\\* Handshake has failed" "*Regular expression indicating failed TLS handshake. The default is what GNUTLS's \"gnutls-cli\" outputs." ;; GNUTLS cli.c:do_handshake() print this string on failure. If the diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1316577..1f76a41 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2004-01-23 Paul Jarc + + * nnmaildir.el (nnmaildir-request-set-mark): Handle the "too many + links" error. + 2004-01-23 Katsumi Yamaoka * dgnushack.el: Advise byte-optimize-form-code-walker to optimize diff --git a/lisp/nnmaildir.el b/lisp/nnmaildir.el index 5391192..c6d7765 100644 --- a/lisp/nnmaildir.el +++ b/lisp/nnmaildir.el @@ -682,8 +682,7 @@ by nnmaildir-request-article.") group (make-nnmaildir--grp :name gname :index 0)) (nnmaildir--mkdir nndir) (nnmaildir--mkdir (nnmaildir--nov-dir nndir)) - (nnmaildir--mkdir (nnmaildir--marks-dir nndir)) - (write-region "" nil (concat nndir "markfile") nil 'no-message)) + (nnmaildir--mkdir (nnmaildir--marks-dir nndir))) (setq read-only (nnmaildir--param pgname 'read-only) ls (or (nnmaildir--param pgname 'directory-files) srv-ls)) (unless read-only @@ -1483,8 +1482,8 @@ by nnmaildir-request-article.") (coding-system-for-write nnheader-file-coding-system) (buffer-file-coding-system nil) (file-coding-system-alist nil) - del-mark del-action add-action set-action marksdir markfile nlist - ranges begin end article all-marks todo-marks did-marks mdir mfile + del-mark del-action add-action set-action marksdir nlist + ranges begin end article all-marks todo-marks mdir mfile pgname ls permarkfile deactivate-mark) (setq del-mark (lambda (mark) @@ -1499,17 +1498,23 @@ by nnmaildir-request-article.") (setq mdir (nnmaildir--subdir marksdir (symbol-name mark)) permarkfile (concat mdir ":") mfile (concat mdir (nnmaildir--art-prefix article))) - (unless (memq mark did-marks) - (setq did-marks (cons mark did-marks)) - (nnmaildir--mkdir mdir) - (unless (file-attributes permarkfile) - (condition-case nil - (add-name-to-file markfile permarkfile) - (file-error - ;; AFS can't make hard links in separate directories - (write-region "" nil permarkfile nil 'no-message))))) - (unless (file-exists-p mfile) - (add-name-to-file permarkfile mfile))) + (condition-case err + (add-name-to-file permarkfile mfile) + (error + (cond + ((eq (car err) 'file-already-exists)) + ((and (eq (car err) 'file-error) + (string= (caddr err) "no such file or directory")) + (nnmaildir--mkdir mdir) + (write-region "" nil permarkfile nil 'no-message) + (add-name-to-file permarkfile mfile)) + ((and (eq (car err) 'file-error) + (string= (caddr err) "too many links")) + (let ((permarkfilenew (concat permarkfile "{new}"))) + (write-region "" nil permarkfilenew nil 'no-message) + (rename-file permarkfilenew permarkfile 'replace) + (add-name-to-file permarkfile mfile))) + (t (signal (car err) (cdr err))))))) todo-marks)) set-action (lambda (article) (funcall add-action) @@ -1529,7 +1534,6 @@ by nnmaildir-request-article.") marksdir (nnmaildir--srv-dir nnmaildir--cur-server) marksdir (nnmaildir--srvgrp-dir marksdir gname) marksdir (nnmaildir--nndir marksdir) - markfile (concat marksdir "markfile") marksdir (nnmaildir--marks-dir marksdir) gname (nnmaildir--grp-name group) pgname (nnmaildir--pgname nnmaildir--cur-server gname) -- 1.7.10.4