aboutsummaryrefslogtreecommitdiffhomepage
path: root/watcher/filenotify/poller.go
diff options
context:
space:
mode:
Diffstat (limited to 'watcher/filenotify/poller.go')
-rw-r--r--watcher/filenotify/poller.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/watcher/filenotify/poller.go b/watcher/filenotify/poller.go
index 71d806209..7479dcbdd 100644
--- a/watcher/filenotify/poller.go
+++ b/watcher/filenotify/poller.go
@@ -11,6 +11,7 @@ import (
"time"
"github.com/fsnotify/fsnotify"
+ "github.com/gohugoio/hugo/common/herrors"
)
var (
@@ -191,7 +192,7 @@ func (r *recording) record(filename string) error {
r.clear()
fi, err := os.Stat(filename)
- if err != nil && !os.IsNotExist(err) {
+ if err != nil && !herrors.IsNotExist(err) {
return err
}
@@ -206,7 +207,7 @@ func (r *recording) record(filename string) error {
if fi.IsDir() {
f, err := os.Open(filename)
if err != nil {
- if os.IsNotExist(err) {
+ if herrors.IsNotExist(err) {
return nil
}
return err
@@ -215,7 +216,7 @@ func (r *recording) record(filename string) error {
fis, err := f.Readdir(-1)
if err != nil {
- if os.IsNotExist(err) {
+ if herrors.IsNotExist(err) {
return nil
}
return err
@@ -260,7 +261,7 @@ func (item *itemToWatch) checkForChanges() ([]fsnotify.Event, error) {
}
err := item.right.record(item.filename)
- if err != nil && !os.IsNotExist(err) {
+ if err != nil && !herrors.IsNotExist(err) {
return nil, err
}