mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-11-13 08:38:43 +03:00
clay: get-fit fix from ted
This commit is contained in:
parent
311cf5329c
commit
6441116e9f
@ -2666,10 +2666,16 @@
|
||||
++ get-fit
|
||||
|= pax=path
|
||||
^- (unit path)
|
||||
:: add the hoon extension to the result
|
||||
::
|
||||
=- ?~(- ~ `(snoc u.- %hoon))
|
||||
|- ^- (unit path)
|
||||
?> ?=([* * ~] pax)
|
||||
:: put the prefix back on the result
|
||||
::
|
||||
=- ?~(- ~ `[i.pax u.-])
|
||||
=. nak (~(got by dir.nak) i.pax)
|
||||
?^ got=(get t.pax)
|
||||
?^ got=(get (snoc t.pax %hoon))
|
||||
(some t.pax)
|
||||
=/ seg=tape (trip i.t.pax)
|
||||
?~ dex=(find "-" seg)
|
||||
|
Loading…
Reference in New Issue
Block a user