Skip to content

Commit

Permalink
feat: add condition for folder as symlink
Browse files Browse the repository at this point in the history
  • Loading branch information
dynamotn committed May 25, 2023
1 parent f2b1e1b commit dd81c32
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/folderutil/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package folderutil

import (
"io/ioutil"
"os"
"path/filepath"
"regexp"
"strings"
Expand Down Expand Up @@ -37,7 +38,9 @@ func ParseConfig(c lazypath.Config) ([]ParsedFolder, error) {
}

for _, f := range fileInfo {
if !f.IsDir() {
if !f.IsDir() && f.Mode()&os.ModeSymlink == 0 {
cli.Debug("Not is directory or symlink: " + f.Name())
cli.Debug(f.Mode().String())
continue
}
if !re.MatchString(f.Name()) {
Expand Down

0 comments on commit dd81c32

Please sign in to comment.