mirror of
https://github.com/urbit/shrub.git
synced 2024-12-20 17:32:11 +03:00
Merge pull request #3027 from urbit/lf/soto-fix
soto: run +on-load migration once
This commit is contained in:
commit
bef3ea46a0
@ -6,8 +6,14 @@
|
||||
/+ *soto, default-agent
|
||||
|%
|
||||
+$ card card:agent:gall
|
||||
+$ state-zero ~
|
||||
::
|
||||
+$ versioned-state
|
||||
$@ state-null
|
||||
state-zero
|
||||
::
|
||||
+$ state-null ~
|
||||
::
|
||||
+$ state-zero [%0 ~]
|
||||
--
|
||||
=| state-zero
|
||||
=* state -
|
||||
@ -18,12 +24,22 @@
|
||||
sc ~(. soto-core bol)
|
||||
def ~(. (default-agent this %|) bol)
|
||||
::
|
||||
++ on-init [~ this]
|
||||
++ on-init
|
||||
:_ this
|
||||
:_ ~
|
||||
:* %pass /srv %agent [our.bol %file-server]
|
||||
%poke %file-server-action
|
||||
!>([%serve-dir /'~dojo' /app/landscape %.n])
|
||||
==
|
||||
++ on-save !>(state)
|
||||
::
|
||||
++ on-load
|
||||
|= old=vase
|
||||
:_ this(state !<(state-zero old))
|
||||
|= old-vase=vase
|
||||
=/ old
|
||||
!<(versioned-state old-vase)
|
||||
?^ old
|
||||
[~ this(state old)]
|
||||
:_ this(state [%0 ~])
|
||||
:~ [%pass /bind/soto %arvo %e %disconnect [~ /'~dojo']]
|
||||
:* %pass /srv %agent [our.bol %file-server]
|
||||
%poke %file-server-action
|
||||
|
Loading…
Reference in New Issue
Block a user