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
Alexander Iljin 2016-05-25 17:51:47 +03:00 committed by Doug Coleman
parent ff26c3d39c
commit aa7a285390
1 changed files with 2 additions and 2 deletions

View File

@ -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 )