Browse Source

daemon/graphdriver/windows: remove fileFlagSequentialScan const

Replace it with the const that's now defined in golang.org/x/sys/windows

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Sebastiaan van Stijn 2 năm trước cách đây
mục cha
commit
d742188e3b
1 tập tin đã thay đổi với 1 bổ sung2 xóa
  1. 1 2
      daemon/graphdriver/windows/windows.go

+ 1 - 2
daemon/graphdriver/windows/windows.go

@@ -911,8 +911,7 @@ func (fg *fileGetCloserWithBackupPrivileges) Get(filename string) (io.ReadCloser
 		if err != nil {
 			return err
 		}
-		const fileFlagSequentialScan = 0x08000000 // FILE_FLAG_SEQUENTIAL_SCAN
-		h, err := windows.CreateFile(&p[0], windows.GENERIC_READ, windows.FILE_SHARE_READ, nil, windows.OPEN_EXISTING, windows.FILE_FLAG_BACKUP_SEMANTICS|fileFlagSequentialScan, 0)
+		h, err := windows.CreateFile(&p[0], windows.GENERIC_READ, windows.FILE_SHARE_READ, nil, windows.OPEN_EXISTING, windows.FILE_FLAG_BACKUP_SEMANTICS|windows.FILE_FLAG_SEQUENTIAL_SCAN, 0)
 		if err != nil {
 			return &os.PathError{Op: "open", Path: longPath, Err: err}
 		}