Skip to content

Commit

Permalink
Do Not Eval Sym Links
Browse files Browse the repository at this point in the history
  • Loading branch information
sethAmazon committed Oct 6, 2023
1 parent 70c071b commit b711393
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions plugins/inputs/logfile/logfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -445,12 +445,12 @@ func generateLogStreamName(fileName string, streamName string) string {
// Directory should be skipped.
// This func is to determine whether the file is actually a directory or a symbolic link pointing to a directory
func isDirectory(filename string) (bool, error) {
path, err := filepath.EvalSymlinks(filename)
if err != nil {
return false, err
}
//path, err := filepath.EvalSymlinks(filename)
//if err != nil {
// return false, err
//}

info, err := os.Stat(path)
info, err := os.Stat(filename)
if err != nil {
return false, err
}
Expand Down

0 comments on commit b711393

Please sign in to comment.