1 // Copyright 2021 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
11 "internal/syscall/windows"
15 // isWindowsRetryable reports whether err is a Windows error code
16 // that may be fixed by retrying a failed filesystem operation.
17 func isWindowsRetryable(err error) bool {
19 unwrapped := errors.Unwrap(err)
25 if err == syscall.ERROR_ACCESS_DENIED {
26 return true // Observed in https://go.dev/issue/50051.
28 if err == windows.ERROR_SHARING_VIOLATION {
29 return true // Observed in https://go.dev/issue/51442.