Skip to content

Commit 85ce03e

Browse files
committed
enhance: it's not necessary to watch the event about size and creation time changes
Signed-off-by: leo <[email protected]>
1 parent 5ca8fd0 commit 85ce03e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Models/Watcher.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public Watcher(IRepository repo, string fullpath, string gitDir)
3737
var combined = new FileSystemWatcher();
3838
combined.Path = fullpath;
3939
combined.Filter = "*";
40-
combined.NotifyFilter = NotifyFilters.LastWrite | NotifyFilters.DirectoryName | NotifyFilters.FileName | NotifyFilters.Size | NotifyFilters.CreationTime;
40+
combined.NotifyFilter = NotifyFilters.LastWrite | NotifyFilters.DirectoryName | NotifyFilters.FileName;
4141
combined.IncludeSubdirectories = true;
4242
combined.Created += OnRepositoryChanged;
4343
combined.Renamed += OnRepositoryChanged;
@@ -52,7 +52,7 @@ public Watcher(IRepository repo, string fullpath, string gitDir)
5252
var wc = new FileSystemWatcher();
5353
wc.Path = fullpath;
5454
wc.Filter = "*";
55-
wc.NotifyFilter = NotifyFilters.LastWrite | NotifyFilters.DirectoryName | NotifyFilters.FileName | NotifyFilters.Size | NotifyFilters.CreationTime;
55+
wc.NotifyFilter = NotifyFilters.LastWrite | NotifyFilters.DirectoryName | NotifyFilters.FileName;
5656
wc.IncludeSubdirectories = true;
5757
wc.Created += OnWorkingCopyChanged;
5858
wc.Renamed += OnWorkingCopyChanged;

0 commit comments

Comments
 (0)