Skip to content

Commit 22c4502

Browse files
committed
watcher: handle renames
rsync copies to temporary files first, and then renames to the proper name.
1 parent 135f644 commit 22c4502

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

watcher/watcher_linux.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ package watcher
55
import "github.com/rjeczalik/notify"
66

77
// Watch IN_CLOSE_WRITE events on Linux to reduce the number of events to process
8-
const notifyFlag = notify.InCloseWrite
8+
const notifyFlag = notify.InCloseWrite | notify.InMovedTo

watcher/watcher_notlinux.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ package watcher
44

55
import "github.com/rjeczalik/notify"
66

7-
const notifyFlag = notify.Write
7+
const notifyFlag = notify.Write | notify.Rename

0 commit comments

Comments
 (0)