summaryrefslogtreecommitdiff
path: root/lisp/net/tramp-adb.el
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2018-09-29 15:33:48 +0200
committerMichael Albinus <michael.albinus@gmx.de>2018-09-29 15:33:48 +0200
commitce0da8a427467a2a5e5636f4d69eb56b56b0925e (patch)
tree5de46dcce14f9a61af05f7ac7b658e877eab7d30 /lisp/net/tramp-adb.el
parent9284e22676a80789a95c3df3b74ac938a0f5eeaa (diff)
downloademacs-ce0da8a427467a2a5e5636f4d69eb56b56b0925e.tar.gz
Rework time-* functions in Tramp
* doc/misc/emacs-mime.texi (time-date): Add time-equal-p. * lisp/net/tramp-compat.el (tramp-compat-time-equal-p): New defsubst. * lisp/net/tramp.el (tramp-file-name-handler): Remove `debug' error handler. (tramp-half-a-year): Remove. (tramp-time-dont-know, tramp-time-doesnt-exist): New defconst. (tramp-time-diff): Remove compat code. (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime): * lisp/net/tramp-adb.el (tramp-do-parse-file-attributes-with-ls) (tramp-adb-handle-set-file-times): * lisp/net/tramp-sh.el (tramp-do-file-attributes-with-ls) (tramp-sh-handle-set-visited-file-modtime) (tramp-sh-handle-verify-visited-file-modtime) (tramp-sh-handle-set-file-times) (tramp-sh-handle-file-newer-than-file-p): Use `tramp-time-dont-know', `tramp-time-doesnt-exist' and `tramp-compat-time-equal-p'. (tramp-sh-handle-verify-visited-file-modtime): Simplify check. * lisp/net/tramp-smb.el (tramp-smb-handle-file-attributes) (tramp-smb-read-file-entry): Use `tramp-time-dont-know'. (tramp-smb-handle-insert-directory): Adapt half-a-year check. * src/editfns.c (Ftime_equal_p): Adapt docstring. * test/lisp/net/tramp-tests.el (tramp-test19-directory-files-and-attributes) (tramp-test22-file-times): Use `tramp-compat-time-equal-p' and `tramp-time-dont-know'. (tramp-test23-visited-file-modtime): Extend test.
Diffstat (limited to 'lisp/net/tramp-adb.el')
-rw-r--r--lisp/net/tramp-adb.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el
index 35b0fdda623..36374f88e0d 100644
--- a/lisp/net/tramp-adb.el
+++ b/lisp/net/tramp-adb.el
@@ -411,9 +411,9 @@ pass to the OPERATION."
;; no way to handle numeric ids in Androids ash
(if (eq id-format 'integer) 0 uid)
(if (eq id-format 'integer) 0 gid)
- '(0 0) ; atime
+ tramp-time-dont-know ; atime
(date-to-time date) ; mtime
- '(0 0) ; ctime
+ tramp-time-dont-know ; ctime
size
mod-string
;; fake
@@ -725,7 +725,9 @@ But handle the case, if the \"test\" command is not available."
(with-parsed-tramp-file-name filename nil
(tramp-flush-file-properties v (file-name-directory localname))
(tramp-flush-file-properties v localname)
- (let ((time (if (or (null time) (equal time '(0 0)))
+ (let ((time (if (or (null time)
+ (tramp-compat-time-equal-p time tramp-time-doesnt-exist)
+ (tramp-compat-time-equal-p time tramp-time-dont-know))
(current-time)
time)))
(tramp-adb-send-command-and-check