Skip to content

Commit 537e74a

Browse files
committed
ignore events in local download tmp dir
1 parent d10f3e3 commit 537e74a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

internal/watcher/retry.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@ package watcher
33
import (
44
"context"
55
"path/filepath"
6+
"strings"
67
"time"
78

89
"github.com/cenkalti/log"
10+
"github.com/putdotio/putio-sync/v2/internal/tmpdir"
911
"github.com/putdotio/putio-sync/v2/internal/walker"
1012
)
1113

@@ -36,7 +38,7 @@ func retry(ctx context.Context, dir string, watchFn func(ctx context.Context, di
3638

3739
// This is not the correct place for filtering path names,
3840
// but for now it is okay because this `retry` function is used in all implementations.
39-
if walker.Ignored(filepath.Base(event)) {
41+
if walker.Ignored(filepath.Base(event)) || strings.Contains(event, tmpdir.Name) {
4042
continue
4143
}
4244

0 commit comments

Comments
 (0)