diff --git a/cmd/gopath.go b/cmd/gopath.go index e1a60650a..65a1d8fdd 100644 --- a/cmd/gopath.go +++ b/cmd/gopath.go @@ -219,8 +219,11 @@ func genNewGoPath(ctx *cli.Context, isTest bool) { oldPath := filepath.Join(installRepoPath, name) + suf newPath := filepath.Join(newGoPathSrc, name) paths := strings.Split(name, "/") - var isExistP bool - var isCurChild bool + var isExistP, isCurChild bool + if name == pkgName { + continue + } + for i := 0; i < len(paths)-1; i++ { pName := strings.Join(paths[:len(paths)-1-i], "/") if _, ok := cachePkgs[pName]; ok { diff --git a/cmd/helper_windows.go b/cmd/helper_windows.go index d714c68a5..5f170e4f4 100644 --- a/cmd/helper_windows.go +++ b/cmd/helper_windows.go @@ -19,6 +19,17 @@ func makeLink(srcPath, destPath string) error { // XP. isWindowsXP = true + // if both are ntfs file system + if volumnType(srcPath) == "NTFS" && volumnType(destPath) == "NTFS" { + // if has junction command installed + file, err := exec.LookPath("junction") + if err == nil { + path, _ := filepath.Abs(file) + + cmd := exec.Command("cmd", "/c", "junction", destPath, srcPath) + return cmd.Run() + } + } os.RemoveAll(destPath) err := com.CopyDir(srcPath, destPath) diff --git a/gopm.go b/gopm.go index c9604a44c..19d88b883 100644 --- a/gopm.go +++ b/gopm.go @@ -29,7 +29,7 @@ import ( // Test that go1.1 tag above is included in builds. main.go refers to this definition. const go11tag = true -const APP_VER = "0.6.0.1206.2" +const APP_VER = "0.6.0.1207" // //cmd.CmdSearch, // cmdClean,