(gnus-read-newsrc-el-file): Make sure the .eld
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Fri, 10 Jan 2003 05:33:29 +0000 (05:33 +0000)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Fri, 10 Jan 2003 05:33:29 +0000 (05:33 +0000)
file exists.

lisp/ChangeLog
lisp/gnus-start.el

index b3e21af..ced3649 100644 (file)
@@ -1,3 +1,8 @@
+2003-01-10  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * gnus-start.el (gnus-read-newsrc-el-file): Make sure the .eld
+       file exists.
+
 2003-01-10  Simon Josefsson  <jas@extundo.com>
 
        * gnus-sum.el (gnus-summary-read-group-1): Don't select first
index ecfdabc..9425dea 100644 (file)
@@ -2181,28 +2181,29 @@ If FORCE is non-nil, the .newsrc file is read."
 
 (defun gnus-read-newsrc-el-file (file)
   (let ((ding-file (concat file "d")))
-    ;; We always, always read the .eld file.
-    (gnus-message 5 "Reading %s..." ding-file)
-    (let (gnus-newsrc-assoc)
-      (let ((coding-system-for-read gnus-ding-file-coding-system))
-       (gnus-load ding-file))
-      ;; Older versions of `gnus-format-specs' are no longer valid
-      ;; in Oort Gnus 0.01.
-      (let ((version
-            (and gnus-newsrc-file-version
-                 (gnus-continuum-version gnus-newsrc-file-version))))
-       (when (or (not version)
-                 (< version 5.090009))
-         (setq gnus-format-specs gnus-default-format-specs)))
-      (when gnus-newsrc-assoc
-       (setq gnus-newsrc-alist gnus-newsrc-assoc)))
-    (gnus-make-hashtable-from-newsrc-alist)
-    (when (file-newer-than-file-p file ding-file)
-      ;; Old format quick file
-      (gnus-message 5 "Reading %s..." file)
-      ;; The .el file is newer than the .eld file, so we read that one
-      ;; as well.
-      (gnus-read-old-newsrc-el-file file))))
+    (when (file-exists-p ding-file)
+      ;; We always, always read the .eld file.
+      (gnus-message 5 "Reading %s..." ding-file)
+      (let (gnus-newsrc-assoc)
+       (let ((coding-system-for-read gnus-ding-file-coding-system))
+         (gnus-load ding-file))
+       ;; Older versions of `gnus-format-specs' are no longer valid
+       ;; in Oort Gnus 0.01.
+       (let ((version
+              (and gnus-newsrc-file-version
+                   (gnus-continuum-version gnus-newsrc-file-version))))
+         (when (or (not version)
+                   (< version 5.090009))
+           (setq gnus-format-specs gnus-default-format-specs)))
+       (when gnus-newsrc-assoc
+         (setq gnus-newsrc-alist gnus-newsrc-assoc)))
+      (gnus-make-hashtable-from-newsrc-alist)
+      (when (file-newer-than-file-p file ding-file)
+       ;; Old format quick file
+       (gnus-message 5 "Reading %s..." file)
+       ;; The .el file is newer than the .eld file, so we read that one
+       ;; as well.
+       (gnus-read-old-newsrc-el-file file)))))
 
 ;; Parse the old-style quick startup file
 (defun gnus-read-old-newsrc-el-file (file)