detect file size modification for polling
polling did not work (at least for a win32 environment)
This commit is contained in:
parent
8dcd1ad3e5
commit
604d99043e
|
@ -84,6 +84,12 @@ func (fw *PollingFileWatcher) ChangeEvents(t *tomb.Tomb, origFi os.FileInfo) *Fi
|
||||||
prevSize = fw.Size
|
prevSize = fw.Size
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
// File got bigger?
|
||||||
|
if prevSize > 0 && prevSize < fw.Size {
|
||||||
|
changes.NotifyModified()
|
||||||
|
prevSize = fw.Size
|
||||||
|
continue
|
||||||
|
}
|
||||||
prevSize = fw.Size
|
prevSize = fw.Size
|
||||||
|
|
||||||
// File was appended to (changed)?
|
// File was appended to (changed)?
|
||||||
|
|
Loading…
Reference in New Issue