Skip to content

Commit

Permalink
Merge pull request #11 from mikebrow/fix-symbolic-link-error
Browse files Browse the repository at this point in the history
fix symbolic link panic
  • Loading branch information
kunalkushwaha authored May 20, 2020
2 parents 96f8e13 + 5a99b30 commit 1f92d0b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ func (t *TagContext) tagFiles(path string, f os.FileInfo, err error) error {
var applier Applier
processed := false

if (f.Mode() & os.ModeSymlink) != 0 { // skip symlinks
return nil
}

if (f.Name() == ".git" || f.Name() == ".svn" || f.Name() == "..") && f.IsDir() {
return filepath.SkipDir
}
Expand Down

0 comments on commit 1f92d0b

Please sign in to comment.