# HG changeset patch # User Lars Hansen # Date 1128795956 0 # Node ID e465f3508fd58c1db3745e634a9d175237de4afa # Parent da00cdf6de37a7cd2f563701ae4bc871d20b40ca (tramp-perl-directory-files-and-attributes): Add error handling. (tramp-handle-directory-files-and-attributes): Handle error perl error message. diff -r da00cdf6de37 -r e465f3508fd5 lisp/net/tramp.el --- 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))))