Mercurial > emacs
changeset 65926:e465f3508fd5
(tramp-perl-directory-files-and-attributes): Add error handling.
(tramp-handle-directory-files-and-attributes): Handle error perl error message.
author | Lars Hansen <larsh@soem.dk> |
---|---|
date | Sat, 08 Oct 2005 18:25:56 +0000 |
parents | da00cdf6de37 |
children | dd2ada4f9271 |
files | lisp/net/tramp.el |
diffstat | 1 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/net/tramp.el Sat Oct 08 14:53:17 2005 +0000 +++ b/lisp/net/tramp.el Sat Oct 08 18:25:56 2005 +0000 @@ -1617,8 +1617,8 @@ on the remote file system.") (defconst tramp-perl-directory-files-and-attributes "\ -chdir($ARGV[0]); -opendir(DIR,\".\"); +chdir($ARGV[0]) or printf(\"\\\"Cannot change to $ARGV[0]: $''!''\\\"\\n\"), exit(); +opendir(DIR,\".\") or printf(\"\\\"Cannot open directory $ARGV[0]: $''!''\\\"\\n\"), exit(); @list = readdir(DIR); closedir(DIR); $n = scalar(@list); @@ -2731,7 +2731,10 @@ (tramp-shell-quote-argument localname) (or id-format 'integer))) (tramp-wait-for-output) - (let* ((root (cons nil (read (current-buffer)))) + (let* ((root (cons nil (let ((object (read (current-buffer)))) + (when (stringp object) + (error object)) + object))) (cell root)) (while (cdr cell) (if (and match (not (string-match match (caadr cell))))