io.files.info: fix circularity regression in file-systems on linux

fix-linux
Doug Coleman 2020-01-04 09:07:32 -06:00
parent f621e69335
commit 4da6f51c91
2 changed files with 7 additions and 2 deletions

View File

@ -34,8 +34,10 @@ HOOK: file-readable? os ( path -- ? )
HOOK: file-writable? os ( path -- ? )
HOOK: file-executable? os ( path -- ? )
: mount-points ( -- assoc )
file-systems [ [ mount-point>> canonicalize-path-full ] keep ] H{ } map>assoc ;
HOOK: mount-points os ( -- assoc )
M: object mount-points
file-systems [ [ mount-point>> ] keep ] H{ } map>assoc ;
: (find-mount-point-info) ( path assoc -- mtab-entry )
[ resolve-symlinks canonicalize-path-full ] dip

View File

@ -78,6 +78,9 @@ frequency pass-number ;
} cleave
] [ { [ libc-error? ] [ errno>> EACCES = ] } 1&& ] ignore-error/f ;
M: linux mount-points
parse-mtab [ [ mount-point>> ] keep ] H{ } map>assoc ;
M: linux file-systems
parse-mtab [ mtab-entry>file-system-info ] map sift ;