mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-15 18:12:47 +03:00
Merge pull request #805 from urbit/fix-dojo-path-parsing
Make dojo not produce incorrect beams when they start with '/'.
This commit is contained in:
commit
b816bd81e3
@ -297,7 +297,20 @@
|
||||
;~(pose sym (easy dp-default-app))
|
||||
==
|
||||
++ dp-beam :: ++beam
|
||||
%+ cook |=(a/path =+((de-beam a) ?^(- u [he-beak (flop a)])))
|
||||
%+ cook
|
||||
|= a/path
|
||||
:: hack: fixup paths that come out of the hoon parser
|
||||
::
|
||||
:: We currently invoke the hoon parser to read relative paths from
|
||||
:: the command line, and this parser will produce leading ~ path
|
||||
:: components with paths that start with a `/`.
|
||||
::
|
||||
:: This entire path is nuts and we shouldn't be representing paths
|
||||
:: as arbitrary hoons.
|
||||
::
|
||||
=? a &(?=(^ a) =('' i.a))
|
||||
t.a
|
||||
=+((de-beam a) ?^(- u [he-beak (flop a)]))
|
||||
=+ vez=(vang | dp-path)
|
||||
(sear plex:vez (stag %clsg poor:vez))
|
||||
::
|
||||
|
Loading…
Reference in New Issue
Block a user