Skip to content

Commit 3836890

Browse files
committed
Ensure that OnTouched event is ignored on folders
1 parent d83c22e commit 3836890

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Program.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,10 @@ private static async Task OnTouchedAsync(IFileSystemEvent fse, CancellationToken
636636

637637
try
638638
{
639-
if (fse.IsFile)
639+
if (
640+
fse.IsFile
641+
&& File.Exists(fse.FileSystemInfo.FullName) //for some reason fse.IsFile is set even for folders
642+
)
640643
{
641644
if (IsWatchedFile(fse.FileSystemInfo.FullName))
642645
{

0 commit comments

Comments
 (0)