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
basis/io/windows/files

View File

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