]> code.delx.au - gnu-emacs/commitdiff
(tramp-perl-directory-files-and-attributes): Add error handling.
authorLars Hansen <larsh@soem.dk>
Sat, 8 Oct 2005 18:26:14 +0000 (18:26 +0000)
committerLars Hansen <larsh@soem.dk>
Sat, 8 Oct 2005 18:26:14 +0000 (18:26 +0000)
(tramp-handle-directory-files-and-attributes): Handle error perl error message.

lisp/ChangeLog
lisp/net/tramp.el

index 96c16c2e558e1e6f4b7cbae2ead0d35842cdd7f3..034235683e5d01aa09689b6b34eea4b5e10152db 100644 (file)
@@ -1,3 +1,9 @@
+2005-10-08  Lars Hansen  <larsh@soem.dk>
+       * 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  <michael.albinus@gmx.de>
 
        Sync with Tramp 2.0.51.
index 89fc86e94352e32bec5fc883cacf8dd606a2c972..6df8a5dab42542975500381e5d3ac4f9a3a3703f 100644 (file)
@@ -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))))