catch errors for windows file-systems word and return a tuple with just a mount point

this happens on empty floppy disk drives
db4
Doug Coleman 2008-11-11 15:35:17 -06:00
parent 146340690f
commit 1f85b7ec14
1 changed files with 9 additions and 3 deletions

View File

@ -300,7 +300,7 @@ M: winnt file-system-info ( path -- file-system-info )
utf16n alien>string utf16n alien>string
] if ; ] if ;
M: winnt file-systems ( -- array ) : find-volumes ( -- array )
find-first-volume find-first-volume
[ [
'[ '[
@ -309,8 +309,14 @@ M: winnt file-systems ( -- array )
[ drop ] produce [ drop ] produce
swap prefix swap prefix
] ]
] [ '[ _ FindVolumeClose win32-error=0/f ] ] bi [ ] cleanup ] [ '[ _ FindVolumeClose win32-error=0/f ] ] bi [ ] cleanup ;
[ volume>paths ] map ;
M: winnt file-systems ( -- array )
find-volumes [ volume>paths ] map
concat [
[ file-system-info ]
[ drop winnt-file-system-info new swap >>mount-point ] recover
] map ;
: file-times ( path -- timestamp timestamp timestamp ) : file-times ( path -- timestamp timestamp timestamp )
[ [