Revert "Issue8273 corrupt nu get cache (#8275)" #8686
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This reverts commit a93882f.
This is a 17.6 fix for #8684
The plan is to revert #8275 in 17.6, as it caused some difficulties, and try to bring it back in 17.7 via #8685.
Summary
#8275 introduced a new issue in which copying a file onto itself could often just delete the file instead of copying anything. Customers reported this issue.
It also fixed a longstanding confusing and unfortunate behavior in MSBuild in which passing the Copy task a symlink as its destination would copy the source file onto the destination of the symlink rather than overwriting the symlink. We will attempt to fix again in a later release.
Customer Impact
Projects that copy a file onto itself using the Copy task without passing identical paths for source and destination instead delete the file without necessarily even logging an error.
Regression?
Yes, from #8275.
Testing
Unit tests and manually tested that the repro described in #8684 no longer fails.
Risk
Minimal (straight revert of the commit that caused the bug)