mirror of
https://github.com/restic/restic.git
synced 2026-11-14 10:02:46 +00:00
windows: ignore temporary access denied error on temp file creation
This commit is contained in:
1 parent
7ee77133fc
commit
e3f065ad54
1 file changed
+4
@@ -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