summaryrefslogtreecommitdiff
path: root/lisp/net/tramp-adb.el
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2015-06-21 20:36:14 +0200
committerMichael Albinus <michael.albinus@gmx.de>2015-06-21 20:36:14 +0200
commit8d4f1e3bd742278d6a3d4c42811845b860d0d104 (patch)
tree288260c039c5fa4708a88c7a0050dc92c30d72a0 /lisp/net/tramp-adb.el
parenta94202b78a8a1ecbb623e76f7feeb3bffc954f12 (diff)
downloademacs-8d4f1e3bd742278d6a3d4c42811845b860d0d104.tar.gz
Improve error handling in tramp-adb.el
* lisp/net/tramp-adb.el (tramp-adb-handle-file-local-copy): Improve error handling.
Diffstat (limited to 'lisp/net/tramp-adb.el')
-rw-r--r--lisp/net/tramp-adb.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el
index 7c509e1d098..63059218579 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