emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 8d4f1e3: Improve error handling in tramp-adb.el


From: Michael Albinus
Subject: [Emacs-diffs] master 8d4f1e3: Improve error handling in tramp-adb.el
Date: Sun, 21 Jun 2015 18:36:29 +0000

branch: master
commit 8d4f1e3bd742278d6a3d4c42811845b860d0d104
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>

    Improve error handling in tramp-adb.el
    
    * lisp/net/tramp-adb.el (tramp-adb-handle-file-local-copy):
    Improve error handling.
---
 lisp/net/tramp-adb.el |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el
index 7c509e1..6305921 100644
--- a/lisp/net/tramp-adb.el
+++ b/lisp/net/tramp-adb.el
@@ -575,8 +575,10 @@ Emacs dired can't find files."
     (let ((tmpfile (tramp-compat-make-temp-file filename)))
       (with-tramp-progress-reporter
          v 3 (format "Fetching %s to tmp file %s" filename tmpfile)
-       (when (tramp-adb-execute-adb-command v "pull" localname tmpfile)
-         (delete-file tmpfile)
+       ;; "adb pull ..." does not always return an error code.
+       (when (or (tramp-adb-execute-adb-command v "pull" localname tmpfile)
+                 (not (file-exists-p tmpfile)))
+         (ignore-errors (delete-file tmpfile))
          (tramp-error
           v 'file-error "Cannot make local copy of file `%s'" filename))
        (set-file-modes



reply via email to

[Prev in Thread] Current Thread [Next in Thread]