[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

nnimap 0.125 -> 0.126 patches



Index: nnimap/ChangeLog
diff -u nnimap/ChangeLog:1.262 nnimap/ChangeLog:1.264
--- nnimap/ChangeLog:1.262	Sun Jul 18 12:28:32 1999
+++ nnimap/ChangeLog	Mon Jul 19 07:55:36 1999
@@ -1,3 +1,12 @@
+1999-07-19  Simon Josefsson  <jas@pdc.kth.se>
+
+	* nnimap 0.126 released.
+
+	* nnimap.el (nnimap-nov-file-name-suffix): New variable.
+	(nnimap-group-overview-filename): Use it.
+	(nnimap-retrieve-headers): Make sure nov cache is writable before
+	using it.
+
 1999-07-18  Simon Josefsson  <jas@pdc.kth.se>
 
 	* nnimap 0.125 released.
Index: nnimap/nnimap.el
diff -u nnimap/nnimap.el:1.212 nnimap/nnimap.el:1.213
--- nnimap/nnimap.el:1.212	Sun Jul 18 12:25:12 1999
+++ nnimap/nnimap.el	Mon Jul 19 03:17:02 1999
@@ -74,7 +74,7 @@
 (gnus-declare-backend "nnimap" 'post-mail 'address 'prompt-address
 		      'physical-address)
 
-(defconst nnimap-version "nnimap 0.125")
+(defconst nnimap-version "nnimap 0.126")
 
 (defvoo nnimap-address nil
   "Address of physical IMAP server.  If nil, use the virtual server's name.")
@@ -162,11 +162,15 @@
 `nnimap-nov-file-name'.")
 
 (defvoo nnimap-nov-file-name "nnimap."
-  "NOV cache base filename. The group name will be appended. A typical
-complete file name would be ~/News/overview/nnimap.pdc.INBOX.ding, or
-~/News/overview/nnimap/pdc/INBOX/ding if `nnmail-use-long-file-names'
-is nil")
+  "NOV cache base filename. The group name and
+`nnimap-nov-file-name-suffix' will be appended. A typical complete
+file name would be ~/News/overview/nnimap.pdc.INBOX.ding.nov, or
+~/News/overview/nnimap/pdc/INBOX/ding/nov if
+`nnmail-use-long-file-names' is nil")
 
+(defvoo nnimap-nov-file-name-suffix ".novcache"
+  "Suffix for NOV cache base filename.")
+
 (defvoo nnimap-nov-is-evil nil
   "If non-nil, nnimap will never generate or use a local nov database
 for this backend.  Using nov databases will speed up header fetching
@@ -395,10 +399,11 @@
 (defun nnimap-group-overview-filename (group server)
   "Make pathname for GROUP."
   (let ((dir (file-name-as-directory (expand-file-name nnimap-directory)))
-	(file (nnheader-translate-file-chars 
-	       (concat nnimap-nov-file-name (if (equal server "")
-						"unnamed"
-					      server) "." group) t)))
+	(file (nnheader-translate-file-chars
+	       (concat nnimap-nov-file-name
+		       (if (equal server "")
+			   "unnamed"
+			 server) "." group nnimap-nov-file-name-suffix) t)))
     (if (or nnmail-use-long-file-names
 	    (file-exists-p (concat dir file)))
 	(concat dir file)
@@ -444,7 +449,14 @@
     (with-current-buffer nntp-server-buffer
       (erase-buffer)
       (when (setq articles (nnimap-retrieve-which-headers articles fetch-old))
-	(if (or gnus-nov-is-evil nnimap-nov-is-evil)
+	(if (or gnus-nov-is-evil nnimap-nov-is-evil
+		(unless (and (gnus-make-directory
+			      (file-name-directory
+			       (nnimap-group-overview-filename group server)))
+			     (file-writable-p
+			      (nnimap-group-overview-filename group server)))
+		  (message "nnimap: Nov cache not writable, %s"
+			   (nnimap-group-overview-filename group server))))
 	    (nnimap-retrieve-headers-from-server
 	     (gnus-compress-sequence articles) group server)
 	  (let (cached (low (car articles)) (high (car (last articles))))
@@ -464,9 +476,6 @@
 	      (nnimap-retrieve-headers-from-server (cons low high) group
 						   server))
 	    (when (buffer-modified-p)
-	      (gnus-make-directory
-	       (file-name-directory
-		(nnimap-group-overview-filename group server)))
 	      (nnmail-write-region
 	       1 (point-max) (nnimap-group-overview-filename group server)
 	       nil 'nomesg))