windows: ignore temporary access denied error on temp file creation

This commit is contained in:
Michael Eischer
2026-05-11 22:42:51 +02:00
parent 7ee77133fc
commit e3f065ad54
+4
View File
@@ -76,6 +76,10 @@ func TempFile(dir, prefix string) (f *os.File, err error) {
if os.IsExist(err) {
continue
}
// Access denied error can occur if the tmp files conflict with each other.
if isAccessDeniedError(err) {
continue
}
return os.NewFile(uintptr(h), path), err
}