mirror of
https://github.com/restic/restic.git
synced 2026-05-14 06:25:22 +00:00
windows: ignore temporary access denied error on temp file creation
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user