From 0bdcf5173f4c50f784081570f2ad7344dfeec379 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Sun, 16 Sep 2012 17:23:25 -0700 Subject: [PATCH] io.files.info: On my Windows7 box, D: is "not really there" and it kills file-systems. Ignore errors instead of dying. --- basis/io/files/info/windows/windows.factor | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/basis/io/files/info/windows/windows.factor b/basis/io/files/info/windows/windows.factor index 3b349403d0..a16461bb2b 100755 --- a/basis/io/files/info/windows/windows.factor +++ b/basis/io/files/info/windows/windows.factor @@ -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 ) [