summaryrefslogtreecommitdiff
path: root/lisp/url/url-cache.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/url/url-cache.el')
-rw-r--r--lisp/url/url-cache.el12
1 files changed, 6 insertions, 6 deletions
diff --git a/lisp/url/url-cache.el b/lisp/url/url-cache.el
index 632a34cdd9d..3765d9dc93d 100644
--- a/lisp/url/url-cache.el
+++ b/lisp/url/url-cache.el
@@ -86,10 +86,10 @@ FILE can be created or overwritten."
The actual return value is the last modification time of the cache file."
(let* ((fname (url-cache-create-filename url))
(attribs (file-attributes fname)))
- (and fname ; got a filename
- (file-exists-p fname) ; file exists
- (not (eq (nth 0 attribs) t)) ; Its not a directory
- (nth 5 attribs)))) ; Can get last mod-time
+ (and fname
+ (file-exists-p fname)
+ (not (eq (file-attribute-type attribs) t))
+ (file-attribute-modification-time attribs))))
(defun url-cache-create-filename-human-readable (url)
"Return a filename in the local cache for URL."
@@ -206,7 +206,7 @@ If `url-standalone-mode' is non-nil, cached items never expire."
(time-add
cache-time
(seconds-to-time (or expire-time url-cache-expire-time)))
- (current-time))))))
+ nil)))))
(defun url-cache-prune-cache (&optional directory)
"Remove all expired files from the cache.
@@ -226,7 +226,7 @@ considered \"expired\"."
(setq deleted-files (1+ deleted-files))))
((time-less-p
(time-add
- (nth 5 (file-attributes file))
+ (file-attribute-modification-time (file-attributes file))
(seconds-to-time url-cache-expire-time))
now)
(delete-file file)