From 53283980d5c7697371309e6a8f24f2fce67fe865 Mon Sep 17 00:00:00 2001 From: Shengyuan Ye Date: Wed, 20 Sep 2023 09:49:57 +0800 Subject: [PATCH] Modified folder detection code against #1031 --- src/node/node.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/node/node.go b/src/node/node.go index 1261e252..88169466 100644 --- a/src/node/node.go +++ b/src/node/node.go @@ -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 {