fix: auto update local file provider (#2245)

Using `Direct: true` will ignore the changes when the file was modified using replace method. Which is a common method used by ftp software.
This commit is contained in:
nunu6689
2025-09-05 13:07:51 +08:00
committed by GitHub
parent f8ee5c1e15
commit fed4b369a3

View File

@@ -183,7 +183,6 @@ func (f *Fetcher[V]) startPullLoop(forceUpdate bool) (err error) {
if f.vehicle.Type() == types.File {
f.watcher, err = fswatch.NewWatcher(fswatch.Options{
Path: []string{f.vehicle.Path()},
Direct: true,
Callback: f.updateCallback,
})
if err != nil {