diff --git a/src/libraries/System.IO.FileSystem.Watcher/src/System/IO/FileSystemWatcher.Linux.cs b/src/libraries/System.IO.FileSystem.Watcher/src/System/IO/FileSystemWatcher.Linux.cs index 4687691395fbb4..4d7ee92d77b272 100644 --- a/src/libraries/System.IO.FileSystem.Watcher/src/System/IO/FileSystemWatcher.Linux.cs +++ b/src/libraries/System.IO.FileSystem.Watcher/src/System/IO/FileSystemWatcher.Linux.cs @@ -638,7 +638,7 @@ private bool ProcessEvent(NotifyEvent nextEvent, ref ReadOnlySpan previous if (previousEventName.Equals(child.Name, StringComparison.Ordinal)) { RemoveWatchedDirectory(child); - return false; + break; } } }