aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Ingebrigtsen2012-02-20 09:22:41 +0100
committerLars Ingebrigtsen2012-02-20 09:22:41 +0100
commit1e54a73bf0dd19d2b7797d1648e9ee442a5a7bf1 (patch)
tree303d9a3c94fc8e137427c5e092ceb56ba3364dc8
parentab1ce9d7e2d5bda36e361583237e0b76a4a17298 (diff)
downloademacs-1e54a73bf0dd19d2b7797d1648e9ee442a5a7bf1.tar.gz
emacs-1e54a73bf0dd19d2b7797d1648e9ee442a5a7bf1.zip
Warn instead of erroring when pruning the URL cache
* url.el (url-retrieve-internal): Warn about file errors when pruning the cache instead of bugging out.
-rw-r--r--lisp/url/ChangeLog5
-rw-r--r--lisp/url/url.el5
2 files changed, 9 insertions, 1 deletions
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog
index e9e7a521c1a..e57b5eccbc2 100644
--- a/lisp/url/ChangeLog
+++ b/lisp/url/ChangeLog
@@ -1,3 +1,8 @@
12012-02-20 Lars Ingebrigtsen <larsi@gnus.org>
2
3 * url.el (url-retrieve-internal): Warn about file errors when
4 pruning the cache instead of bugging out (bug#10831).
5
12012-02-19 Lars Ingebrigtsen <larsi@gnus.org> 62012-02-19 Lars Ingebrigtsen <larsi@gnus.org>
2 7
3 * url-queue.el (url-queue-callback-function): Remove the job from 8 * url-queue.el (url-queue-callback-function): Remove the job from
diff --git a/lisp/url/url.el b/lisp/url/url.el
index 933bceb2e6f..5ced789e4e4 100644
--- a/lisp/url/url.el
+++ b/lisp/url/url.el
@@ -186,7 +186,10 @@ the server."
186 (setf (url-use-cookies url) (not inhibit-cookies)) 186 (setf (url-use-cookies url) (not inhibit-cookies))
187 ;; Once in a while, remove old entries from the URL cache. 187 ;; Once in a while, remove old entries from the URL cache.
188 (when (zerop (% url-retrieve-number-of-calls 1000)) 188 (when (zerop (% url-retrieve-number-of-calls 1000))
189 (url-cache-prune-cache)) 189 (condition-case error
190 (url-cache-prune-cache)
191 (file-error
192 (message "Error when expiring the cache: %s" error))))
190 (setq url-retrieve-number-of-calls (1+ url-retrieve-number-of-calls)) 193 (setq url-retrieve-number-of-calls (1+ url-retrieve-number-of-calls))
191 (let ((loader (url-scheme-get-property (url-type url) 'loader)) 194 (let ((loader (url-scheme-get-property (url-type url) 'loader))
192 (url-using-proxy (if (url-host url) 195 (url-using-proxy (if (url-host url)