io.files.info: Fix find-mount-point.

flac
Doug Coleman 2020-01-04 13:33:45 -06:00 committed by Steve Ayerhart
parent 13e35cdca2
commit 177e6e07e6
No known key found for this signature in database
GPG Key ID: 5BFD39C5359E967D
1 changed files with 4 additions and 4 deletions

View File

@ -39,17 +39,17 @@ HOOK: mount-points os ( -- assoc )
M: object mount-points M: object mount-points
file-systems [ [ mount-point>> ] keep ] H{ } map>assoc ; file-systems [ [ mount-point>> ] keep ] H{ } map>assoc ;
: (find-mount-point-info) ( path assoc -- mtab-entry ) : (find-mount-point) ( path assoc -- path )
[ resolve-symlinks canonicalize-path-full ] dip [ resolve-symlinks canonicalize-path-full ] dip
2dup at* [ 2dup at* [
2nip 2nip
] [ ] [
drop [ parent-directory ] dip drop [ parent-directory ] dip
(find-mount-point-info) (find-mount-point)
] if ; ] if ;
: find-mount-point-info ( path -- file-system-info ) : find-mount-point ( path -- path' )
mount-points (find-mount-point-info) ; mount-points (find-mount-point) mount-point>> ;
{ {
{ [ os unix? ] [ "io.files.info.unix" ] } { [ os unix? ] [ "io.files.info.unix" ] }