From: Michael Albinus Date: Wed, 16 Aug 2023 09:48:28 +0000 (+0200) Subject: Fix infloop error in Tramp X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=22d031f644d38e385f422ffc4855385d9052659b;p=emacs.git Fix infloop error in Tramp * lisp/net/tramp-sh.el (tramp-find-file-exists-command): Do not call `tramp-get-ls-command'. (Bug#65321) --- diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 426682ddef1..4e6ba6e38d7 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -4255,8 +4255,10 @@ file exists and nonzero exit status otherwise." vec (format "%s %s" result existing)) (not (tramp-send-command-and-check vec (format "%s %s" result nonexistent))))) + ;; We cannot use `tramp-get-ls-command', this results in an infloop. + ;; (Bug#65321) (ignore-errors - (and (setq result (format "%s -d" (tramp-get-ls-command vec))) + (and (setq result (format "ls -d >%s" (tramp-get-remote-null-device vec))) (tramp-send-command-and-check vec (format "%s %s" result existing)) (not (tramp-send-command-and-check