You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Breaking change]: FileSystemEventArgs.FullPath returns a truly fully qualified path #27916
🏁 Release: .NET 7Work items for the .NET 7 releasebreaking-changeIndicates a .NET Core breaking changesource incompatibleSource code may encounter a breaking change in behavior when targeting the new version.
Initially the FullPath property of FileSystemEventArgs and RenamedEventArgs returned whatever directory path it was passed in from FileSystemWatcher. That could mean even a relative path, that does not match with the true intent and name of the FullPath and OldFullPath properties on the event args classes.
Version
.NET 7 Preview 1
Reverted in .NET 7 Preview 5
Previous behavior
FullPath and OldFullPath simply mirror what is was passed into FileSystemWatcher initially, which can include a relative path.
New behavior
The FullPath and OldFullPath will now return a fully qualified path even when FileSystemWatcher is initialized with a relative path.
Type of breaking change
Binary incompatible: Existing binaries may encounter a breaking change in behavior, such as failure to load/execute or different run-time behavior.
Source incompatible: Source code may encounter a breaking change in behavior when targeting the new runtime/component/SDK, such as compile errors or different run-time behavior.
Reason for change
To align the actual result with the intent and name of the FullPath/OldFullPath properties from the event args.
Recommended action
The users will have to check their usage of FullPath and OldFullPath when dealing with FileSystemEventArgs and RenamedEventArgs objects and make sure they account for the path change.
Feature area
Core .NET libraries
Affected APIs
Only the FullPath and OldFullPath properties are affected.
We decided to revert this breaking change, and the change back will be included in .NET 7 Preview 5. Here's the context for that decision: dotnet/runtime#62606 (comment)
@gewarren, I will submit a PR to add additional API docs around the FullPath and OldFullPath properties to explain their behavior more accurately. Should the breaking change doc hat was added be deleted or should it be retained and updated to state the change was reverted?
@jeffhandley Thanks for the update. Once Preview 5 ships, I think we can delete the breaking change article, since anyone upgrading to .NET 7 for the first time will likely use the latest preview version (right?).
🏁 Release: .NET 7Work items for the .NET 7 releasebreaking-changeIndicates a .NET Core breaking changesource incompatibleSource code may encounter a breaking change in behavior when targeting the new version.
Activity
slask commentedon Jan 21, 2022
The PR with the fix: dotnet/runtime#63051
Original issue: dotnet/runtime#62606
jeffhandley commentedon May 5, 2022
We decided to revert this breaking change, and the change back will be included in .NET 7 Preview 5. Here's the context for that decision: dotnet/runtime#62606 (comment)
@gewarren, I will submit a PR to add additional API docs around the
FullPathandOldFullPathproperties to explain their behavior more accurately. Should the breaking change doc hat was added be deleted or should it be retained and updated to state the change was reverted?gewarren commentedon May 6, 2022
@jeffhandley Thanks for the update. Once Preview 5 ships, I think we can delete the breaking change article, since anyone upgrading to .NET 7 for the first time will likely use the latest preview version (right?).