From: Lars Hansen Date: Sat, 8 Oct 2005 18:26:14 +0000 (+0000) Subject: (tramp-perl-directory-files-and-attributes): Add error handling. X-Git-Tag: emacs-pretest-22.0.90~6742 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8cb0a5590f96cb25238fe7b00c3c58a421bbb4fb;p=emacs.git (tramp-perl-directory-files-and-attributes): Add error handling. (tramp-handle-directory-files-and-attributes): Handle error perl error message. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 96c16c2e558..034235683e5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2005-10-08 Lars Hansen + * net/tramp.el (tramp-perl-directory-files-and-attributes): Add + error handling. + (tramp-handle-directory-files-and-attributes): Handle error perl + error message. + 2005-10-08 Michael Albinus Sync with Tramp 2.0.51. diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 89fc86e9435..6df8a5dab42 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -1617,8 +1617,8 @@ printf( 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 @@ of." (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))))