fs: fix O_NOFOLLOW for metadata handles on Windows

This commit is contained in:
Michael Eischer
2024-11-16 15:38:40 +01:00
parent 48dbefc37e
commit 6084848e5a
2 changed files with 8 additions and 2 deletions

View File

@@ -5,8 +5,10 @@ package fs
// TODO honor flags when opening files
// O_NOFOLLOW is a noop on Windows.
const O_NOFOLLOW int = 0
// O_NOFOLLOW is currently only interpreted by FS.OpenFile in metadataOnly mode and ignored by OpenFile.
// The value of the constant is invented and only for use within this fs package. It must not be used in other contexts.
// It must not conflict with the other O_* values from go/src/syscall/types_windows.go
const O_NOFOLLOW int = 0x40000000
// O_DIRECTORY is a noop on Windows.
const O_DIRECTORY int = 0