Skip to content

Commit

Permalink
XXX os.Stat -> os.Lstat
Browse files Browse the repository at this point in the history
  • Loading branch information
nshalman committed Aug 20, 2021
1 parent 382c2c0 commit 97656d2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fen.go
Expand Up @@ -95,7 +95,7 @@ func (w *Watcher) AddRaw(name string) error {
if w.port.PathIsWatched(name) {
return nil
}
stat, err := os.Stat(name)
stat, err := os.Lstat(name)
switch {
case err != nil:
return err
Expand All @@ -114,7 +114,7 @@ func (w *Watcher) Remove(name string) error {
if !w.port.PathIsWatched(name) {
return fmt.Errorf("can't remove non-existent FEN watch for: %s", name)
}
stat, err := os.Stat(name)
stat, err := os.Lstat(name)
switch {
case err != nil:
return err
Expand Down Expand Up @@ -244,7 +244,7 @@ func (w *Watcher) handleEvent(event *unix.PortEvent) error {

// If we get here, it means we've hit an event above that requires us to
// continue watching the file or directory
stat, err := os.Stat(path)
stat, err := os.Lstat(path)
if err != nil {
return err
}
Expand Down

0 comments on commit 97656d2

Please sign in to comment.