Skip to content

Commit

Permalink
fix(scanner): fix watcher panic
Browse files Browse the repository at this point in the history
  • Loading branch information
mazzz1y authored and sentriz committed Feb 17, 2023
1 parent 19be6f0 commit 78d0c52
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scanner/scanner.go
Expand Up @@ -186,7 +186,10 @@ func (s *Scanner) ExecuteWatch() error {
t.Reset(10 * time.Second)
}
fileInfo, err := os.Stat(event.Name)
if err != nil && fileInfo.IsDir() {
if err != nil {
break
}
if fileInfo.IsDir() {
dirName = event.Name
} else {
dirName = filepath.Dir(event.Name)
Expand Down

0 comments on commit 78d0c52

Please sign in to comment.