Skip to content

Commit

Permalink
Fix specific file
Browse files Browse the repository at this point in the history
  • Loading branch information
oneut committed Mar 25, 2018
1 parent ef521d4 commit 98fc4d1
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion monitor/fsnotify_monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 101,18 @@ func (fm *fsnotifyMonitor) initMonitorPath() {
continue
}

fm.addWalkMonitorPath(absPath)
fileInfo, err := os.Stat(absPath)
if err != nil {
panic(err)
}

if fileInfo.IsDir() {
fm.addWalkMonitorPath(absPath)
continue
}

// Support specific file.
fm.addMonitorPath(absPath)
}
}

Expand Down

0 comments on commit 98fc4d1

Please sign in to comment.