fixed: error
This commit is contained in:
parent
2a86751b60
commit
855b7b495c
|
@ -50,7 +50,7 @@ func main() {
|
||||||
if event.Name == inotify.EventCreate {
|
if event.Name == inotify.EventCreate {
|
||||||
err = watcher.AddWatch(event.Path)
|
err = watcher.AddWatch(event.Path)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalf("failed to add watch %s, error: %v\n", os.Args[1], err)
|
log.Fatalf("failed to add watch %s, error: %v\n", event.Path, err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fmt.Println("Directory:", event.Path, "event:", event.Name)
|
fmt.Println("Directory:", event.Path, "event:", event.Name)
|
||||||
|
|
|
@ -43,7 +43,7 @@ func main() {
|
||||||
if event.Name == inotify.EventCreate {
|
if event.Name == inotify.EventCreate {
|
||||||
err = watcher.AddWatch(event.Path)
|
err = watcher.AddWatch(event.Path)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalf("failed to add watch %s, error: %v\n", os.Args[1], err)
|
log.Fatalf("failed to add watch %s, error: %v\n", event.Path, err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fmt.Println("Directory:", event.Path, "event:", event.Name)
|
fmt.Println("Directory:", event.Path, "event:", event.Name)
|
||||||
|
|
Loading…
Reference in New Issue