summaryrefslogtreecommitdiff
path: root/lisp/net
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/net')
-rw-r--r--lisp/net/tramp.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 723eba0a93b..fb124389278 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -4185,9 +4185,10 @@ Returns a file name in `tramp-auto-save-directory' for autosaving this file."
;; `file-writable-p' calls 'file-expand-file-name'. We
;; cannot use `tramp-run-real-handler' therefore.
(let (file-name-handler-alist)
- (file-writable-p (file-name-directory localname))
- (or (file-directory-p localname)
- (file-writable-p localname))))
+ (and
+ (file-writable-p (file-name-directory localname))
+ (or (file-directory-p localname)
+ (file-writable-p localname)))))
;; Short track: if we are on the local host, we can run directly.
(tramp-run-real-handler
'write-region