io.files.info.windows: fix file-readable?
This fixes issue #1470. Now the method tries to open the file handle for reading and returns t on success. This approach makes Windows check the current user's permissions.locals-and-roots
parent
2264638a61
commit
043c6984b9
|
@ -244,6 +244,9 @@ M: windows file-systems ( -- array )
|
|||
: set-file-write-time ( path timestamp -- )
|
||||
[ f f ] dip set-file-times ;
|
||||
|
||||
M: windows file-readable? file-info >boolean ;
|
||||
M: windows file-readable?
|
||||
normalize-path open-read-handle
|
||||
dup [ CloseHandle win32-error=0/f ] when* >boolean ;
|
||||
|
||||
M: windows file-writable? file-info attributes>> +read-only+ swap member? not ;
|
||||
M: windows file-executable? file-executable-type windows-executable? ;
|
||||
|
|
Loading…
Reference in New Issue