Skip to content

Commit

Permalink
fix symbolic link panic
Browse files Browse the repository at this point in the history
Signed-off-by: Mike Brown <[email protected]>
  • Loading branch information
mikebrow committed May 15, 2020
1 parent 96f8e13 commit 5a99b30
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 5a99b30

Please sign in to comment.