mirror of
https://github.com/coreybutler/nvm-windows.git
synced 2026-01-14 07:03:17 +08:00
Modified folder detection code against #1031
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
"os/exec"
|
||||
"regexp"
|
||||
"strings"
|
||||
"os"
|
||||
|
||||
// "../semver"
|
||||
"github.com/blang/semver"
|
||||
@@ -95,7 +96,7 @@ func GetInstalled(root string) []string {
|
||||
files, _ := ioutil.ReadDir(root)
|
||||
|
||||
for i := len(files) - 1; i >= 0; i-- {
|
||||
if files[i].IsDir() {
|
||||
if files[i].IsDir() || (files[i].Mode()&os.ModeSymlink == os.ModeSymlink) {
|
||||
isnode, _ := regexp.MatchString("v", files[i].Name())
|
||||
|
||||
if isnode {
|
||||
|
||||
Reference in New Issue
Block a user