diff --git a/winrmcp/winrmcp.go b/winrmcp/winrmcp.go index 1d5b088..15d299e 100644 --- a/winrmcp/winrmcp.go +++ b/winrmcp/winrmcp.go @@ -64,15 +64,14 @@ func (fs *Winrmcp) Copy(fromPath, toPath string) error { if !fi.IsDir() { return fs.Write(toPath, f) - } else { - fw := fileWalker{ - client: fs.client, - config: fs.config, - toDir: toPath, - fromDir: fromPath, - } - return filepath.Walk(fromPath, fw.copyFile) } + fw := fileWalker{ + client: fs.client, + config: fs.config, + toDir: toPath, + fromDir: fromPath, + } + return filepath.Walk(fromPath, fw.copyFile) } func (fs *Winrmcp) Write(toPath string, src io.Reader) error {