From aa7a285390c1c0f0cfd85f26332603886ae8492b Mon Sep 17 00:00:00 2001 From: Alexander Iljin Date: Wed, 25 May 2016 17:51:47 +0300 Subject: [PATCH] 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). --- basis/io/files/info/windows/windows.factor | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/basis/io/files/info/windows/windows.factor b/basis/io/files/info/windows/windows.factor index 37be7164d3..1faada4a86 100755 --- a/basis/io/files/info/windows/windows.factor +++ b/basis/io/files/info/windows/windows.factor @@ -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 )