diff --git a/lib/file/file_windows.go b/lib/file/file_windows.go index 7840f98e1..cefd4f2f6 100644 --- a/lib/file/file_windows.go +++ b/lib/file/file_windows.go @@ -61,7 +61,7 @@ func OpenFile(path string, mode int, perm os.FileMode) (*os.File, error) { default: createmode = syscall.OPEN_EXISTING } - h, e := syscall.CreateFile(pathp, access, sharemode, nil, createmode, syscall.FILE_ATTRIBUTE_NORMAL, 0) + h, e := syscall.CreateFile(pathp, access, sharemode, nil, createmode, syscall.FILE_ATTRIBUTE_NORMAL|syscall.FILE_FLAG_BACKUP_SEMANTICS, 0) if e != nil { return nil, e }