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

fix-linux
Doug Coleman 2020-01-04 13:33:45 -06:00
parent 596d44f5af
commit 9beeedfe18
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" ] }