From 8af4d4470b40ae061cc52b71d92aaff1003f038d Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Thu, 5 Dec 2013 15:58:51 +0800 Subject: [PATCH] copy for windows xp bug fixed --- cmd/helper_windows.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/cmd/helper_windows.go b/cmd/helper_windows.go index 144f0bee2..d714c68a5 100644 --- a/cmd/helper_windows.go +++ b/cmd/helper_windows.go @@ -20,12 +20,13 @@ func makeLink(srcPath, destPath string) error { // XP. isWindowsXP = true os.RemoveAll(destPath) - _, dirName := filepath.Split(destPath) - // .vendor dir should not be copy - if dirName != doc.VENDOR { - return com.CopyDir(srcPath, destPath) + + err := com.CopyDir(srcPath, destPath) + if err == nil { + // .vendor dir should not be copy + os.RemoveAll(filepath.Join(destPath, doc.VENDOR)) } - return nil + return err } func volumnType(dir string) string {