File tree Expand file tree Collapse file tree 3 files changed +6
-11
lines changed Expand file tree Collapse file tree 3 files changed +6
-11
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 5
5
"sync"
6
6
"time"
7
7
8
+ "github.com/windmilleng/tilt/internal/ospath"
9
+
8
10
"github.com/windmilleng/fsevents"
9
11
)
10
12
@@ -77,8 +79,7 @@ func (d *darwinNotify) Add(name string) error {
77
79
// Check if this is a subdirectory of any of the paths
78
80
// we're already watching.
79
81
for _ , parent := range es .Paths {
80
- isChild := pathIsChildOf (name , parent )
81
- if isChild {
82
+ if ospath .IsChild (parent , name ) {
82
83
return nil
83
84
}
84
85
}
Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ import (
10
10
11
11
"github.com/pkg/errors"
12
12
"github.com/windmilleng/fsnotify"
13
+
14
+ "github.com/windmilleng/tilt/internal/ospath"
13
15
)
14
16
15
17
// A naive file watcher that uses the plain fsnotify API.
@@ -151,7 +153,7 @@ func (d *naiveNotify) shouldNotify(e fsnotify.Event) bool {
151
153
} else {
152
154
// TODO(dmiller): maybe use a prefix tree here?
153
155
for path := range d .notifyList {
154
- if pathIsChildOf ( e .Name , path ) {
156
+ if ospath . IsChild ( path , e .Name ) {
155
157
return true
156
158
}
157
159
}
You can’t perform that action at this time.
0 commit comments