-
-
Notifications
You must be signed in to change notification settings - Fork 9
fix: Trigger correct notifications when moving directories #866
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request fixes directory move notifications in the file system watcher to trigger the correct events based on the destination path. The key change ensures that when a directory is moved outside the watched directory, a delete event is properly triggered instead of a rename event.
- Fixed notification filter logic to use appropriate filters for different file system object types (files vs directories)
- Updated path matching logic to properly handle directory moves that cross watched directory boundaries
- Added comprehensive test coverage for directory move scenarios
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| Tests/Testably.Abstractions.Tests/FileSystem/FileSystemWatcher/NotifyFiltersTests.cs | Added new test cases for directory move operations within and outside watched directories |
| Source/Testably.Abstractions.Testing/Storage/InMemoryStorage.cs | Fixed notification filter to use type-appropriate filters instead of hardcoded FileName filter |
| Source/Testably.Abstractions.Testing/FileSystem/FileSystemWatcherMock.cs | Updated path matching and event triggering logic to handle directory moves across watched boundaries |
Source/Testably.Abstractions.Testing/FileSystem/FileSystemWatcherMock.cs
Show resolved
Hide resolved
Source/Testably.Abstractions.Testing/FileSystem/FileSystemWatcherMock.cs
Show resolved
Hide resolved
Test Results 37 files ± 0 37 suites ±0 29m 46s ⏱️ + 9m 5s For more details on these failures, see this check. Results for commit d8fc93f. ± Comparison against base commit df2e064. This pull request removes 36390 and adds 36450 tests. Note that renamed tests count towards both.This pull request removes 1784 skipped tests and adds 1784 skipped tests. Note that renamed tests count towards both. |
|
|
This is addressed in release v4.3.8. |



This pull request fixes directory move notifications in the file system watcher to trigger the correct events based on the destination path. The key change ensures that when a directory is moved outside the watched directory, a delete event is properly triggered instead of a rename event.
Key changes: