(let (f1-attr f2-attr)
(and (setq f1-attr (file-attributes (file-truename file1)))
(setq f2-attr (file-attributes (file-truename file2)))
- (equal f1-attr f2-attr))))))
+ (progn
+ ;; Haiku systems change the file's last access timestamp
+ ;; every time `stat' is called. Make sure to not compare
+ ;; the timestamps in that case.
+ (or (equal f1-attr f2-attr)
+ (when (and (eq system-type 'haiku)
+ (consp (nthcdr 4 f1-attr))
+ (consp (nthcdr 4 f2-attr)))
+ (ignore-errors
+ (setcar (nthcdr 4 f1-attr) nil)
+ (setcar (nthcdr 4 f2-attr) nil))
+ (equal f1-attr f2-attr)))))))))
(defun file-in-directory-p (file dir)
"Return non-nil if DIR is a parent directory of FILE.