Skip to content

Commit

Permalink
Modified folder detection code against coreybutler#1031
Browse files Browse the repository at this point in the history
  • Loading branch information
Shengyuan Ye committed Sep 20, 2023
1 parent 7591688 commit 5328398
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"os/exec"
"regexp"
"strings"
"os"

// "../semver"
"github.com/blang/semver"
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 5328398

Please sign in to comment.