changeset 95050:adc57176d5f1

* net/tramp.el (tramp-handle-write-region): Fix check for short track. Reported by Glenn Morris <rgm@gnu.org>.
author Michael Albinus <michael.albinus@gmx.de>
date Fri, 16 May 2008 20:17:46 +0000
parents 438808a998aa
children dc328afec261
files lisp/net/tramp.el
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/net/tramp.el	Fri May 16 19:15:26 2008 +0000
+++ b/lisp/net/tramp.el	Fri May 16 20:17:46 2008 +0000
@@ -4185,9 +4185,10 @@
 	       ;; `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