]> git.eshelyaron.com Git - emacs.git/commit
Fix Tramp's file-attributes cache
authorMichael Albinus <michael.albinus@gmx.de>
Tue, 1 Apr 2025 13:24:44 +0000 (15:24 +0200)
committerEshel Yaron <me@eshelyaron.com>
Tue, 8 Apr 2025 05:35:37 +0000 (07:35 +0200)
commit811f061f1930b2d650f7a6d5b897f889ffc779bd
tree41e83b7f29a1cd84160e6b17fe12fd8d62d8842e
parent4c160e83b539646f3dd6a4cca0a37d44a5118131
Fix Tramp's file-attributes cache

* lisp/net/tramp-adb.el (tramp-adb-handle-file-executable-p):
Check also for sticky bit.
(tramp-adb-handle-file-readable-p): Simplify.

* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-executable-p):
Check also for sticky bit.  Force `file-attributes' check.

* lisp/net/tramp-sh.el (tramp-sh-handle-file-executable-p):
Check also for sticky bit.
(tramp-sh-handle-file-readable-p)
(tramp-sh-handle-file-writable-p): Simplify.

* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-file-executable-p):
Check also for sticky bit.
(tramp-sudoedit-handle-file-readable-p)
(tramp-sudoedit-handle-file-writable-p): Simplify.

* lisp/net/tramp.el (tramp-use-file-attributes): Fix docstring.
(tramp-handle-file-readable-p, tramp-handle-file-writable-p):
Force `file-attributes' check.  Use `file-truename' for symbolic links.
(tramp-check-cached-permissions): New optional argument FORCE.
Fix symlink check.  Check also for sticky bit.  (Bug#77402)

* test/lisp/net/tramp-tests.el
(tramp-test20-file-modes-without-file-attributes)
(tramp-test21-file-links-without-file-attributes): New tests.

(cherry picked from commit 3f9ac99fc7e024678dff1ac3ff38e617ef2606fe)
lisp/net/tramp-adb.el
lisp/net/tramp-gvfs.el
lisp/net/tramp-sh.el
lisp/net/tramp-sudoedit.el
lisp/net/tramp.el
test/lisp/net/tramp-tests.el