summaryrefslogtreecommitdiff
path: root/lisp/gnus/nnmaildir.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/gnus/nnmaildir.el')
-rw-r--r--lisp/gnus/nnmaildir.el42
1 files changed, 23 insertions, 19 deletions
diff --git a/lisp/gnus/nnmaildir.el b/lisp/gnus/nnmaildir.el
index fbabf573c4f..afaf3dcfcff 100644
--- a/lisp/gnus/nnmaildir.el
+++ b/lisp/gnus/nnmaildir.el
@@ -318,15 +318,15 @@ This variable is set by `nnmaildir-request-article'.")
(setq attr (file-attributes
(concat dir (number-to-string number-opened))))
(or attr (throw 'return (1- number-opened)))
- (setq ino-opened (nth 10 attr)
- nlink (nth 1 attr)
+ (setq ino-opened (file-attribute-inode-number attr)
+ nlink (file-attribute-link-number attr)
number-linked (+ number-opened nlink))
(if (or (< nlink 1) (< number-linked nlink))
(signal 'error '("Arithmetic overflow")))
(setq attr (file-attributes
(concat dir (number-to-string number-linked))))
(or attr (throw 'return (1- number-linked)))
- (unless (equal ino-opened (nth 10 attr))
+ (unless (equal ino-opened (file-attribute-inode-number attr))
(setq number-opened number-linked))))))
;; Make the given server, if non-nil, be the current server. Then make the
@@ -392,8 +392,8 @@ This variable is set by `nnmaildir-request-article'.")
(setq make-new-file nil
previous-number-link 0))
(let* ((attr (file-attributes path-open))
- (nlink (nth 1 attr)))
- (setq ino-open (nth 10 attr)
+ (nlink (file-attribute-link-number attr)))
+ (setq ino-open (file-attribute-inode-number attr)
number-link (+ number-open nlink))
(if (or (< nlink 1) (< number-link nlink))
(signal 'error '("Arithmetic overflow"))))
@@ -412,7 +412,7 @@ This variable is set by `nnmaildir-request-article'.")
number-open number-link))
((nnmaildir--eexist-p err)
(let ((attr (file-attributes path-link)))
- (unless (equal (nth 10 attr) ino-open)
+ (unless (equal (file-attribute-inode-number attr) ino-open)
(setq number-open number-link
number-link 0))))
(t (signal (car err) (cdr err)))))))))
@@ -437,8 +437,8 @@ This variable is set by `nnmaildir-request-article'.")
(unless attr
(nnmaildir--expired-article group article)
(throw 'return nil))
- (setq mtime (nth 5 attr)
- attr (nth 7 attr)
+ (setq mtime (file-attribute-modification-time attr)
+ attr (file-attribute-size attr)
nov (nnmaildir--art-nov article)
dir (nnmaildir--nndir dir)
novdir (nnmaildir--nov-dir dir)
@@ -794,29 +794,33 @@ This variable is set by `nnmaildir-request-article'.")
(setq read-only (nnmaildir--param pgname 'read-only)
ls (or (nnmaildir--param pgname 'directory-files) srv-ls))
(unless read-only
- (setq x (nth 11 (file-attributes tdir)))
- (unless (and (equal x (nth 11 nattr)) (equal x (nth 11 cattr)))
+ (setq x (file-attribute-device-number (file-attributes tdir)))
+ (unless (and (equal x (file-attribute-device-number nattr))
+ (equal x (file-attribute-device-number cattr)))
(setf (nnmaildir--srv-error nnmaildir--cur-server)
(concat "Maildir spans filesystems: " absdir))
(throw 'return nil))
(dolist (file (funcall ls tdir 'full "\\`[^.]" 'nosort))
(setq x (file-attributes file))
- (if (or (> (cadr x) 1) (time-less-p (nth 4 x) 36h-ago))
+ (if (or (> (file-attribute-link-number x) 1)
+ (time-less-p (file-attribute-access-time x) 36h-ago))
(delete-file file))))
(or scan-msgs
isnew
(throw 'return t))
- (setq nattr (nth 5 nattr))
+ (setq nattr (file-attribute-modification-time nattr))
(if (equal nattr (nnmaildir--grp-new group))
(setq nattr nil))
(if read-only (setq dir (and (or isnew nattr) ndir))
(when (or isnew nattr)
(dolist (file (funcall ls ndir nil "\\`[^.]" 'nosort))
(setq x (concat ndir file))
- (and (time-less-p (nth 5 (file-attributes x)) nil)
+ (and (time-less-p (file-attribute-modification-time
+ (file-attributes x))
+ nil)
(rename-file x (concat cdir (nnmaildir--ensure-suffix file)))))
(setf (nnmaildir--grp-new group) nattr))
- (setq cattr (nth 5 (file-attributes cdir)))
+ (setq cattr (file-attribute-modification-time (file-attributes cdir)))
(if (equal cattr (nnmaildir--grp-cur group))
(setq cattr nil))
(setq dir (and (or isnew cattr) cdir)))
@@ -903,7 +907,7 @@ This variable is set by `nnmaildir-request-article'.")
(if (nnmaildir--srv-gnm nnmaildir--cur-server)
(nnmail-get-new-mail 'nnmaildir nil nil scan-group))
(unintern scan-group groups))
- (setq x (nth 5 (file-attributes srv-dir))
+ (setq x (file-attribute-modification-time (file-attributes srv-dir))
scan-group (null scan-group))
(if (equal x (nnmaildir--srv-mtime nnmaildir--cur-server))
(if scan-group
@@ -936,7 +940,7 @@ This variable is set by `nnmaildir-request-article'.")
(dolist (grp x)
(unintern grp groups))
(setf (nnmaildir--srv-mtime nnmaildir--cur-server)
- (nth 5 (file-attributes srv-dir))))
+ (file-attribute-modification-time (file-attributes srv-dir))))
(and scan-group
(nnmaildir--srv-gnm nnmaildir--cur-server)
(nnmail-get-new-mail 'nnmaildir nil nil))))))
@@ -993,7 +997,7 @@ This variable is set by `nnmaildir-request-article'.")
(curdir (nnmaildir--cur
(nnmaildir--srvgrp-dir
(nnmaildir--srv-dir nnmaildir--cur-server) gname)))
- (curdir-mtime (nth 5 (file-attributes curdir)))
+ (curdir-mtime (file-attribute-modification-time (file-attributes curdir)))
pgname flist always-marks never-marks old-marks dir
all-marks marks ranges markdir read ls
old-mmth new-mmth mtime existing missing deactivate-mark)
@@ -1046,7 +1050,7 @@ This variable is set by `nnmaildir-request-article'.")
;; a filename flag, get the later of the mtimes for markdir and
;; curdir, otherwise only the markdir counts.
(setq mtime
- (let ((markdir-mtime (nth 5 (file-attributes markdir))))
+ (let ((markdir-mtime (file-attribute-modification-time (file-attributes markdir))))
(cond
((null (nnmaildir--mark-to-flag mark))
markdir-mtime)
@@ -1599,7 +1603,7 @@ This variable is set by `nnmaildir-request-article'.")
(nnmaildir--expired-article group article))
((and no-force
(progn
- (setq time (nth 5 time)
+ (setq time (file-attribute-modification-time time)
bound-iter boundary)
(while (and bound-iter time
(= (car bound-iter) (car time)))