]> gitweb.factorcode.org Git - factor.git/commitdiff
io.files.info: fix circularity regression in file-systems on linux
authorDoug Coleman <doug.coleman@gmail.com>
Sat, 4 Jan 2020 15:07:32 +0000 (09:07 -0600)
committerDoug Coleman <doug.coleman@gmail.com>
Sat, 4 Jan 2020 15:07:32 +0000 (09:07 -0600)
basis/io/files/info/info.factor
basis/io/files/info/unix/linux/linux.factor

index baf41ab88c3d1af9836dc169abf02b53699e7b14..555620aa337af97b2825fb51e8a3a87fdbfcb7c0 100644 (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
index 1bf37532f167717e720744df552b456f2090af75..e179354685a15c499af1b731f68372cb2517de56 100644 (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 ;