summaryrefslogtreecommitdiff
path: root/lisp/url
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2006-09-20 17:35:13 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2006-09-20 17:35:13 +0000
commit162fbe11f5a65e7be3b92157f349fe7f843de0cf (patch)
tree41d588d641cf12d74be0041791c08124a873e4ca /lisp/url
parent02bb2aabefbfe0055424511f0298712b7c716d5c (diff)
downloademacs-162fbe11f5a65e7be3b92157f349fe7f843de0cf.tar.gz
(url-http-head-file-attributes): Add device "info".
Diffstat (limited to 'lisp/url')
-rw-r--r--lisp/url/ChangeLog6
-rw-r--r--lisp/url/url-http.el24
2 files changed, 18 insertions, 12 deletions
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog
index fdd735193c9..a6afb0ba20f 100644
--- a/lisp/url/ChangeLog
+++ b/lisp/url/ChangeLog
@@ -1,3 +1,9 @@
+2006-09-20 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * url-dav.el (url-dav-file-attributes): Simplify.
+
+ * url-http.el (url-http-head-file-attributes): Add device "info".
+
2006-09-18 Michael Olson <mwolson@gnu.org>
* url-methods.el (url-scheme-register-proxy): Handle case where
diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el
index a1d87e1bd31..1b8bc459f49 100644
--- a/lisp/url/url-http.el
+++ b/lisp/url/url-http.el
@@ -1151,19 +1151,19 @@ CBARGS as the arguments."
(defalias 'url-http-file-readable-p 'url-http-file-exists-p)
(defun url-http-head-file-attributes (url &optional id-format)
- (let ((buffer (url-http-head url))
- (attributes nil))
+ (let ((buffer (url-http-head url)))
(when buffer
- (setq attributes (make-list 11 nil))
- (setf (nth 1 attributes) 1) ; Number of links to file
- (setf (nth 2 attributes) 0) ; file uid
- (setf (nth 3 attributes) 0) ; file gid
- (setf (nth 7 attributes) ; file size
- (url-http-symbol-value-in-buffer 'url-http-content-length
- buffer -1))
- (setf (nth 8 attributes) (eval-when-compile (make-string 10 ?-)))
- (kill-buffer buffer))
- attributes))
+ (prog1
+ (list
+ nil ;dir / link / normal file
+ 1 ;number of links to file.
+ 0 0 ;uid ; gid
+ nil nil nil ;atime ; mtime ; ctime
+ (url-http-symbol-value-in-buffer 'url-http-content-length
+ buffer -1)
+ (eval-when-compile (make-string 10 ?-))
+ nil nil nil) ;whether gid would change ; inode ; device.
+ (kill-buffer buffer)))))
;;;###autoload
(defun url-http-file-attributes (url &optional id-format)