io.files.info.windows: fix flags in open-read-handle
Add FILE_SHARE_WRITE and FILE_SHARE_DELETE flags and calls CreateFile-flags hook. This fixes file-readable? so that it uses the same flags as open-read (issue #1470).locals-and-roots
parent
ff26c3d39c
commit
aa7a285390
|
@ -80,8 +80,8 @@ TUPLE: windows-file-info < file-info-tuple attributes ;
|
|||
INVALID_HANDLE_VALUE = not ; inline
|
||||
|
||||
: open-read-handle ( path -- handle/f )
|
||||
GENERIC_READ FILE_SHARE_READ f
|
||||
OPEN_EXISTING FILE_FLAG_BACKUP_SEMANTICS f
|
||||
GENERIC_READ share-mode f
|
||||
OPEN_EXISTING 0 CreateFile-flags f
|
||||
CreateFileW [ valid-handle? ] keep f ? ;
|
||||
|
||||
: get-file-information-stat ( path -- file-info )
|
||||
|
|
Loading…
Reference in New Issue