fix(windows): finish contested auth cleanup
This commit is contained in:
@@ -1108,7 +1108,14 @@ func (directory *windowsPrivateDirectory) RemoveClaim(source, claim string) (boo
|
||||
claimed.Close,
|
||||
func() error { return closeAndDeleteWindowsPrivateRegular(value) },
|
||||
func() error {
|
||||
remaining, remainingErr := openWindowsPrivateRegularAt(directory.handle, claim, windows.FILE_GENERIC_READ|windows.DELETE, 1)
|
||||
// A concurrent loser can briefly hold the orphan observation read-only after
|
||||
// source deletion. Preserve no-delete sharing and wait only for that close.
|
||||
remaining, remainingErr := openWindowsPrivateClaimRegular(
|
||||
directory.handle,
|
||||
claim,
|
||||
windows.FILE_GENERIC_READ|windows.DELETE,
|
||||
1,
|
||||
)
|
||||
if remainingErr != nil {
|
||||
return ErrUnsafeFile
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user