aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPo Lu2023-08-26 16:27:03 +0800
committerPo Lu2023-08-26 16:37:31 +0800
commit91830b8bf383b8cfdb7d9bd18895047cff820df7 (patch)
tree4d11f1e6c69d5facce2d2122154f67dd945cede0
parent09351df10a1041d58c7236484f96d6999bfe9cb0 (diff)
downloademacs-91830b8bf383b8cfdb7d9bd18895047cff820df7.tar.gz
emacs-91830b8bf383b8cfdb7d9bd18895047cff820df7.zip
Revise last change to copy-directory
* lisp/files.el (copy-directory): Instead of demoting errors from set-file-times, refrain from setting them if newname is located within /contents.
-rw-r--r--lisp/files.el12
1 files changed, 8 insertions, 4 deletions
diff --git a/lisp/files.el b/lisp/files.el
index a015dd3cf4d..4188615e490 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -6623,10 +6623,14 @@ into NEWNAME instead."
6623 (follow-flag (unless follow 'nofollow))) 6623 (follow-flag (unless follow 'nofollow)))
6624 (if modes (set-file-modes newname modes follow-flag)) 6624 (if modes (set-file-modes newname modes follow-flag))
6625 (when times 6625 (when times
6626 ;; Don't didactically fail if file times can't be set, as 6626 ;; When built for an Android GUI build, don't attempt to
6627 ;; some file systems forbid modifying them. 6627 ;; set file times for a file within /content, as the
6628 (with-demoted-errors "Setting file times: %s" 6628 ;; Android VFS layer does not provide means to change file
6629 (set-file-times newname times follow-flag)))))))) 6629 ;; timestamps.
6630 (when (or (not (and (eq system-type 'android)
6631 (featurep 'android)))
6632 (not (string-prefix-p "/content/" newname)))
6633 (set-file-times newname times follow-flag))))))))
6630 6634
6631 6635
6632;; At time of writing, only info uses this. 6636;; At time of writing, only info uses this.