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

flac
Doug Coleman 2020-01-04 09:07:32 -06:00 committed by Steve Ayerhart
parent e75dd893b0
commit 9b39d75083
No known key found for this signature in database
GPG Key ID: 5BFD39C5359E967D
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 ;