aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManuel Giraud2022-03-16 17:38:18 +0100
committerMichael Albinus2022-03-16 17:38:18 +0100
commit6b2e6a53ecdc78411a167a1ea5718dcddaf9411c (patch)
treedcdcee33f62aa2e816ada96eb1200e976480caa0
parent679b9cc9ff3c65b4b6d3da2987703e0dfd3001be (diff)
downloademacs-6b2e6a53ecdc78411a167a1ea5718dcddaf9411c.tar.gz
emacs-6b2e6a53ecdc78411a167a1ea5718dcddaf9411c.zip
* lisp/net/tramp-sh.el (tramp-find-file-exists-command): Fix comment.
-rw-r--r--lisp/net/tramp-sh.el13
1 files changed, 7 insertions, 6 deletions
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index c80190a67fb..475d48cc30b 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -4134,13 +4134,10 @@ file exists and nonzero exit status otherwise."
4134 ;; The algorithm is as follows: we try a list of several commands. 4134 ;; The algorithm is as follows: we try a list of several commands.
4135 ;; For each command, we first run `$cmd /' -- this should return 4135 ;; For each command, we first run `$cmd /' -- this should return
4136 ;; true, as the root directory always exists. And then we run 4136 ;; true, as the root directory always exists. And then we run
4137 ;; `$cmd /this\ file\ does\ not\ exist ', hoping that the file indeed 4137 ;; `$cmd /\ this\ file\ does\ not\ exist\ ', hoping that the file
4138 ;; does not exist. This should return false. We use the first 4138 ;; indeed does not exist. This should return false. We use the
4139 ;; command we find that seems to work. 4139 ;; first command we find that seems to work.
4140 ;; The list of commands to try is as follows: 4140 ;; The list of commands to try is as follows:
4141 ;; `ls -d' This works on most systems, but NetBSD 1.4
4142 ;; has a bug: `ls' always returns zero exit
4143 ;; status, even for files which don't exist.
4144 ;; `test -e' Some Bourne shells have a `test' builtin 4141 ;; `test -e' Some Bourne shells have a `test' builtin
4145 ;; which does not know the `-e' option. 4142 ;; which does not know the `-e' option.
4146 ;; `/bin/test -e' For those, the `test' binary on disk normally 4143 ;; `/bin/test -e' For those, the `test' binary on disk normally
@@ -4148,6 +4145,10 @@ file exists and nonzero exit status otherwise."
4148 ;; is sometimes `/bin/test' and sometimes it's 4145 ;; is sometimes `/bin/test' and sometimes it's
4149 ;; `/usr/bin/test'. 4146 ;; `/usr/bin/test'.
4150 ;; `/usr/bin/test -e' In case `/bin/test' does not exist. 4147 ;; `/usr/bin/test -e' In case `/bin/test' does not exist.
4148 ;; `ls -d' This works on most systems, but NetBSD 1.4
4149 ;; has a bug: `ls' always returns zero exit
4150 ;; status, even for files which don't exist.
4151
4151 (unless (or 4152 (unless (or
4152 (ignore-errors 4153 (ignore-errors
4153 (and (setq result (format "%s -e" (tramp-get-test-command vec))) 4154 (and (setq result (format "%s -e" (tramp-get-test-command vec)))