From 8cb0a5590f96cb25238fe7b00c3c58a421bbb4fb Mon Sep 17 00:00:00 2001 From: Lars Hansen Date: Sat, 8 Oct 2005 18:26:14 +0000 Subject: [PATCH] (tramp-perl-directory-files-and-attributes): Add error handling. (tramp-handle-directory-files-and-attributes): Handle error perl error message. --- lisp/ChangeLog | 6 ++++++ lisp/net/tramp.el | 9 ++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) 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)))) -- 2.39.5