|
From: | Michael Albinus |
Subject: | Re: [PATCH 1/1] Try using file-attributes cache in file-executable-p, code refactoring |
Date: | Tue, 18 Aug 2009 05:47:14 +0200 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) |
Julian Scheid <address@hidden> writes: > + ;; Examine file-attributes cache to see if request can be > + ;; satisfied without remote operation. > + (or (tramp-check-cached-permissions localname ?x) > + (zerop (tramp-run-test "-x" filename)))))) This test could be optimized, checking for the sticky bit set for the owner. Example: arthur:~> chmod 04122 aaa; ll aaa ---s-w--w- 1 albinus albinus 0 2009-08-18 05:37 aaa arthur:~> test -x aaa; echo $? 0 arthur:~> chmod 02212 aaa ; ll aaa --w---s-w- 1 albinus albinus 0 2009-08-18 05:37 aaa arthur:~> test -x aaa ; echo $? 1 arthur:~> chmod 01221 aaa ; ll aaa --w--w---t 1 albinus albinus 0 2009-08-18 05:37 aaa arthur:~> test -x aaa ; echo $? 1 Best regards, Michael.
[Prev in Thread] | Current Thread | [Next in Thread] |