io.files.info: On my Windows7 box, D: is "not really there" and it kills

file-systems. Ignore errors instead of dying.
db4
Doug Coleman 2012-09-16 17:23:25 -07:00
parent 1a91e3a8ff
commit 0bdcf5173f
1 changed files with 4 additions and 2 deletions
basis/io/files/info/windows

View File

@ -182,10 +182,12 @@ CONSTANT: names-buf-length 16384
[ { } ] [ [ alien>native-string ] map ] if-empty
] with-destructors ;
! Can error with T{ windows-error f 21 "The device is not ready." }
! if there is a D: that is not ready, for instance. Ignore these drives.
M: windows file-systems ( -- array )
find-volumes [ volume>paths ] map concat [
(file-system-info)
] map ;
[ (file-system-info) ] [ 2drop f ] recover
] map sift ;
: file-times ( path -- timestamp timestamp timestamp )
[