Merge pull request #1766 from TimAtLassian/issue-1765-fix-symlink-upload

Create temporary copy of symlink before uploading, fixes #1765
This commit is contained in:
Ross Smith II 2014-12-30 07:25:49 -08:00
commit 4787f87a4b
1 changed files with 1 additions and 1 deletions

View File

@ -336,7 +336,7 @@ func scpUploadFile(dst string, src io.Reader, w io.Writer, r *bufio.Reader, fi *
var mode os.FileMode var mode os.FileMode
var size int64 var size int64
if fi != nil { if fi != nil && (*fi).Mode().IsRegular() {
mode = (*fi).Mode().Perm() mode = (*fi).Mode().Perm()
size = (*fi).Size() size = (*fi).Size()
} else { } else {