changeset 75802:3936e0dfa3fc

* net/tramp.el (tramp-get-ls-command, tramp-get-file-exists-command) (tramp-get-remote-ln): Handle error case. Reported by Chris Moore <dooglus@gmail.com>.
author Michael Albinus <michael.albinus@gmx.de>
date Mon, 12 Feb 2007 06:19:54 +0000
parents 62615657e69c
children 81c369551691
files lisp/ChangeLog lisp/net/tramp.el
diffstat 2 files changed, 21 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Sun Feb 11 22:30:21 2007 +0000
+++ b/lisp/ChangeLog	Mon Feb 12 06:19:54 2007 +0000
@@ -1,3 +1,9 @@
+2007-02-12  Michael Albinus  <michael.albinus@gmx.de>
+
+	* net/tramp.el (tramp-get-ls-command, tramp-get-file-exists-command)
+	(tramp-get-remote-ln): Handle error case.  Reported by Chris Moore
+	<dooglus@gmail.com>.
+
 2007-02-11  Kim F. Storm  <storm@cua.dk>
 
 	* bindings.el (ctl-x-map): Remove register compatibility bindings
--- a/lisp/net/tramp.el	Sun Feb 11 22:30:21 2007 +0000
+++ b/lisp/net/tramp.el	Mon Feb 12 06:19:54 2007 +0000
@@ -7105,10 +7105,12 @@
 ;; Variables local to connection.
 
 (defun tramp-get-ls-command (multi-method method user host)
-  (save-excursion
-    (tramp-maybe-open-connection multi-method method user host)
-    (set-buffer (tramp-get-buffer multi-method method user host))
-    tramp-ls-command))
+  (or
+   (save-excursion
+     (tramp-maybe-open-connection multi-method method user host)
+     (set-buffer (tramp-get-buffer multi-method method user host))
+     tramp-ls-command)
+   (error "Couldn't find remote `ls' command")))
 
 (defun tramp-get-test-groks-nt (multi-method method user host)
   (save-excursion
@@ -7117,16 +7119,20 @@
     tramp-test-groks-nt))
 
 (defun tramp-get-file-exists-command (multi-method method user host)
-  (save-excursion
-    (tramp-maybe-open-connection multi-method method user host)
-    (set-buffer (tramp-get-buffer multi-method method user host))
-    tramp-file-exists-command))
+  (or
+   (save-excursion
+     (tramp-maybe-open-connection multi-method method user host)
+     (set-buffer (tramp-get-buffer multi-method method user host))
+     tramp-file-exists-command)
+   (error "Couldn't find remote `test -e' command")))
 
 (defun tramp-get-remote-perl (multi-method method user host)
   (tramp-get-connection-property "perl" nil multi-method method user host))
 
 (defun tramp-get-remote-ln (multi-method method user host)
-  (tramp-get-connection-property "ln" nil multi-method method user host))
+  (or
+   (tramp-get-connection-property "ln" nil multi-method method user host)
+   (error "Couldn't find remote `ln' command")))
 
 (defun tramp-get-remote-uid (multi-method method user host)
   (tramp-get-connection-property "uid" nil multi-method method user host))