mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-15 01:52:42 +03:00
gall: fix handling of empty path list
This commit is contained in:
parent
4217bfa2da
commit
8cbb8f142e
@ -1378,9 +1378,8 @@
|
||||
::
|
||||
%revoke-access
|
||||
=/ who !<(@p vase)
|
||||
=/ =path /sole/(cat 3 'drum_' (scot %p who))
|
||||
:_ state(acl (~(del in acl) who))
|
||||
[%give %kick [path]~ `who]~
|
||||
[%give %kick ~ `who]~
|
||||
::
|
||||
%list-access
|
||||
~& acl
|
||||
|
@ -1110,31 +1110,30 @@
|
||||
++ ap-ducts-from-paths
|
||||
|= [target-paths=(list path) target-ship=(unit ship)]
|
||||
^- (list duct)
|
||||
?: &(?=(~ target-paths) ?=(~ target-ship))
|
||||
~[agent-duct]
|
||||
%- zing
|
||||
%+ turn target-paths
|
||||
|= =path
|
||||
(ap-ducts-from-path `path target-ship)
|
||||
:: +ap-ducts-from-path: get ducts subscribed to path
|
||||
::
|
||||
++ ap-ducts-from-path
|
||||
|= [target-path=(unit path) target-ship=(unit ship)]
|
||||
^- (list duct)
|
||||
?: &(?=(~ target-path) ?=(~ target-ship))
|
||||
~[agent-duct]
|
||||
%+ murn ~(tap by incoming.subscribers.current-agent)
|
||||
|= [=duct =ship =path]
|
||||
^- (unit ^duct)
|
||||
?~ target-ship
|
||||
?: =(target-path `path)
|
||||
`duct
|
||||
~
|
||||
?~ target-path
|
||||
?~ target-paths
|
||||
?~ target-ship
|
||||
~[agent-duct]
|
||||
%+ murn ~(tap by incoming.subscribers.current-agent)
|
||||
|= [=duct =ship =path]
|
||||
^- (unit ^duct)
|
||||
?: =(target-ship `ship)
|
||||
`duct
|
||||
~
|
||||
?: &(=(target-path `path) =(target-ship `ship))
|
||||
%- zing
|
||||
%+ turn target-paths
|
||||
|= =path
|
||||
(ap-ducts-from-path path target-ship)
|
||||
:: +ap-ducts-from-path: get ducts subscribed to path
|
||||
::
|
||||
++ ap-ducts-from-path
|
||||
|= [target-path=path target-ship=(unit ship)]
|
||||
^- (list duct)
|
||||
%+ murn ~(tap by incoming.subscribers.current-agent)
|
||||
|= [=duct =ship =path]
|
||||
^- (unit ^duct)
|
||||
?: ?& =(target-path path)
|
||||
|(=(target-ship ~) =(target-ship `ship))
|
||||
==
|
||||
`duct
|
||||
~
|
||||
:: +ap-apply: apply effect.
|
||||
|
Loading…
Reference in New Issue
Block a user