From 73c1c94ea8107e4673fd82430900aaf1ae2fa804 Mon Sep 17 00:00:00 2001 From: David Farrell <1469333+dnmfarrell@users.noreply.github.com> Date: Fri, 10 Jun 2022 09:00:50 -0400 Subject: [PATCH 1/2] dojo: have dojo check =dir exists before switching Scries clay for a list of files beneath the provided path - if the response is nil then the dir must not exist (clay abhors a vacuum). Fixes #1559 --- pkg/arvo/app/dojo.hoon | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/arvo/app/dojo.hoon b/pkg/arvo/app/dojo.hoon index b127a3ce0b..839c080dd4 100644 --- a/pkg/arvo/app/dojo.hoon +++ b/pkg/arvo/app/dojo.hoon @@ -568,6 +568,9 @@ ?: ?=([@ ~] pax) ~[i.pax %base '0'] ?: ?=([@ @ ~] pax) ~[i.pax i.t.pax '0'] pax + ?: =(~ .^((list path) %ct pax)) + =- +>(..dy (he-diff %tan - ~)) + rose+[" " `~]^~[leaf+"dir does not exist:" (smyt pax)] =. dir (need (de-beam pax)) =- +>(..dy (he-diff %tan - ~)) rose+[" " `~]^~[leaf+"=%" (smyt (en-beam he-beak s.dir))] From 3a10b4d8f337b5a2910d6b9ae91af9e497433649 Mon Sep 17 00:00:00 2001 From: David Farrell <1469333+dnmfarrell@users.noreply.github.com> Date: Mon, 13 Jun 2022 20:34:23 -0400 Subject: [PATCH 2/2] dojo: simplify dir not exist error message build Incorporates @Fang- suggested changes (thanks!). Drops the path serialization as it will print on two separate lines, and it is already displayed in dojo immediately above the error message: > =dir /=base=/ge dojo: dir does not exist --- pkg/arvo/app/dojo.hoon | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/arvo/app/dojo.hoon b/pkg/arvo/app/dojo.hoon index 839c080dd4..bcb41ea7ef 100644 --- a/pkg/arvo/app/dojo.hoon +++ b/pkg/arvo/app/dojo.hoon @@ -569,8 +569,7 @@ ?: ?=([@ @ ~] pax) ~[i.pax i.t.pax '0'] pax ?: =(~ .^((list path) %ct pax)) - =- +>(..dy (he-diff %tan - ~)) - rose+[" " `~]^~[leaf+"dir does not exist:" (smyt pax)] + +(..dy (he-diff %tan 'dojo: dir does not exist' ~)) =. dir (need (de-beam pax)) =- +>(..dy (he-diff %tan - ~)) rose+[" " `~]^~[leaf+"=%" (smyt (en-beam he-beak s.dir))]