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
The code writing the hash is not Atomic, so that hash can be corrupt.
The right code should
using(varsha512=SHA512.Create()){packageHash=Convert.ToBase64String(sha512.ComputeHash(nupkgStream));}-// Note: PackageRepository relies on the hash file being written out as the final operation as part of a package install-// to assume a package was fully installed.+// Note: PackageRepository relies on the hash file being written out as the+// final operation as part of a package install to assume a package was fully installed.// ==> Change here - Create temp file for hash, (see above code for temp file for nupkg)File.WriteAllText(tempHashPath,packageHash);File.Move(tempHashPath,hashPath);
The text was updated successfully, but these errors were encountered:
See - NuGetArchive/NuGet3@0005387#diff-81ea29218a578d3a3f3492f0b1e45b32R122
The code writing the hash is not Atomic, so that hash can be corrupt.
The right code should
The text was updated successfully, but these errors were encountered: