From 0f36a051d5c4d6e33c0d61d45e1bd6a94e1312d0 Mon Sep 17 00:00:00 2001 From: Tim Cinel Date: Tue, 16 Dec 2014 14:11:28 +1100 Subject: [PATCH] Create temporary copy of symlink before uploading, fixes #1765 --- communicator/ssh/communicator.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/communicator/ssh/communicator.go b/communicator/ssh/communicator.go index 245f3ceb0..07fb1eaa2 100644 --- a/communicator/ssh/communicator.go +++ b/communicator/ssh/communicator.go @@ -336,7 +336,7 @@ func scpUploadFile(dst string, src io.Reader, w io.Writer, r *bufio.Reader, fi * var mode os.FileMode var size int64 - if fi != nil { + if fi != nil && (*fi).Mode().IsRegular() { mode = (*fi).Mode().Perm() size = (*fi).Size() } else {