diff options
Diffstat (limited to 'lisp/net/tramp-adb.el')
-rw-r--r-- | lisp/net/tramp-adb.el | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el index 96ef95dbe30..a118e7d2143 100644 --- a/lisp/net/tramp-adb.el +++ b/lisp/net/tramp-adb.el @@ -591,8 +591,9 @@ Emacs dired can't find files." (ignore-errors (delete-file tmpfile)) (tramp-error v 'file-error "Cannot make local copy of file `%s'" filename)) - (set-file-modes tmpfile (logior (or (file-modes filename) 0) #o0400) - 'nofollow)) + (set-file-modes + tmpfile + (logior (or (tramp-compat-file-modes filename 'nofollow) 0) #o0400))) tmpfile))) (defun tramp-adb-handle-file-writable-p (filename) @@ -637,8 +638,7 @@ But handle the case, if the \"test\" command is not available." (tmpfile (tramp-compat-make-temp-file filename))) (when (and append (file-exists-p filename)) (copy-file filename tmpfile 'ok) - (set-file-modes tmpfile (logior (or (file-modes tmpfile) 0) #o0600) - 'nofollow)) + (set-file-modes tmpfile (logior (or (file-modes tmpfile) 0) #o0600))) (tramp-run-real-handler #'write-region (list start end tmpfile append 'no-message lockname)) (with-tramp-progress-reporter @@ -669,8 +669,9 @@ But handle the case, if the \"test\" command is not available." (defun tramp-adb-handle-set-file-modes (filename mode &optional flag) "Like `set-file-modes' for Tramp files." - flag ;; FIXME: Support 'nofollow'. (with-parsed-tramp-file-name filename nil + (when (and (eq flag 'nofollow) (file-symlink-p filename)) + (tramp-error v 'file-error "Cannot chmod %s with %s flag" filename flag)) (tramp-flush-file-properties v localname) (tramp-adb-send-command-and-check v (format "chmod %o %s" mode localname)))) |