From a63aeb64b70ba20cd1611bf97e435dd43a1c93f7 Mon Sep 17 00:00:00 2001
From: Michael Albinus <michael.albinus@gmx.de>
Date: Tue, 13 Jun 2017 15:54:09 +0200
Subject: [PATCH] * lisp/net/tramp-sh.el (tramp-set-file-uid-gid): Do not
 handle locally on w32.

---
 lisp/net/tramp-sh.el | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index f66dc7a7e22..f7b457ebf04 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -1543,9 +1543,8 @@ be non-negative integers."
 		  (tramp-shell-quote-argument localname))))))
 
       ;; We handle also the local part, because there doesn't exist
-      ;; `set-file-uid-gid'.  On W32 "chown" might not work.  We add a
-      ;; timeout for this.
-      (with-timeout (5 nil)
+      ;; `set-file-uid-gid'.  On W32 "chown" does not work.
+      (unless (memq system-type '(ms-dos windows-nt))
 	(let ((uid (or (and (natnump uid) uid) (tramp-get-local-uid 'integer)))
 	      (gid (or (and (natnump gid) gid) (tramp-get-local-gid 'integer))))
 	  (tramp-call-process
@@ -4426,7 +4425,8 @@ Goes through the list `tramp-inline-compress-commands'."
 		 (if (memq system-type '(windows-nt))
 		     "echo %s | \"%s\" | \"%s\""
 		   "echo %s | %s | %s")
-		 magic compress decompress) nil nil))
+		 magic compress decompress)
+		nil nil))
 	    (throw 'next nil))
 	  (tramp-message
 	   vec 5
-- 
2.39.5