(follow-flag (unless follow 'nofollow)))
(if modes (set-file-modes newname modes follow-flag))
(when times
- ;; Don't didactically fail if file times can't be set, as
- ;; some file systems forbid modifying them.
- (with-demoted-errors "Setting file times: %s"
- (set-file-times newname times follow-flag))))))))
+ ;; When built for an Android GUI build, don't attempt to
+ ;; set file times for a file within /content, as the
+ ;; Android VFS layer does not provide means to change file
+ ;; timestamps.
+ (when (or (not (and (eq system-type 'android)
+ (featurep 'android)))
+ (not (string-prefix-p "/content/" newname)))
+ (set-file-times newname times follow-flag))))))))
\f
;; At time of writing, only info uses this.