]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix infloop error in Tramp
authorMichael Albinus <michael.albinus@gmx.de>
Wed, 16 Aug 2023 09:48:28 +0000 (11:48 +0200)
committerMichael Albinus <michael.albinus@gmx.de>
Wed, 16 Aug 2023 09:48:28 +0000 (11:48 +0200)
* lisp/net/tramp-sh.el (tramp-find-file-exists-command): Do not
call `tramp-get-ls-command'.  (Bug#65321)

lisp/net/tramp-sh.el

index 426682ddef14236dc401b915aa4a6ae4c14a6916..4e6ba6e38d76457e7ae37a343b82c094f6f2c681 100644 (file)
@@ -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