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
If the Copy task sees that the destination exists, it deletes it before overwriting. This is important, because if the destination is hardlinked to some other file, previously the Copy task used to effectively overwrite all other hardlinked copies of the content, and this caused corruption that's hard to investigate.
Let's ensure the Copy logic in this repo does the same thing (delete the file before overwriting to "unlink" it in case it's a hardlink)
The text was updated successfully, but these errors were encountered:
I'm explicitly choosing to let the caller decide what delete policy to apply. I fixed this in the Microsoft.Build.CopyOnWrite SDK in the linked PR above.
MSBuild Copy task has recently added this important logic:
https://github.com/dotnet/msbuild/blob/c36a54ed3308d1516ffe1a86b9086c42e4ca996f/src/Tasks/Copy.cs#L288-L294
If the Copy task sees that the destination exists, it deletes it before overwriting. This is important, because if the destination is hardlinked to some other file, previously the Copy task used to effectively overwrite all other hardlinked copies of the content, and this caused corruption that's hard to investigate.
Let's ensure the Copy logic in this repo does the same thing (delete the file before overwriting to "unlink" it in case it's a hardlink)
The text was updated successfully, but these errors were encountered: