From 235c1ea6633c80a804ce5c2f7cc4f9593c434e6b Mon Sep 17 00:00:00 2001
From: obarun <eric@obarun.org>
Date: Mon, 10 Jan 2022 18:28:01 +1100
Subject: [PATCH] bug fix: pass trough seed file only for 66-enable process,
 use new interface of tree_isvalid() function

---
 src/lib66/tree_sethome.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib66/tree_sethome.c b/src/lib66/tree_sethome.c
index f872a032..ccf74539 100644
--- a/src/lib66/tree_sethome.c
+++ b/src/lib66/tree_sethome.c
@@ -54,7 +54,7 @@ int tree_sethome(ssexec_t *info)
 
     } else {
 
-        r = tree_isvalid(info) ;
+        r = tree_isvalid(info->base.s, info->treename.s) ;
 
         if (r < 0) {
             /** The tree name exist on the system
@@ -66,7 +66,7 @@ int tree_sethome(ssexec_t *info)
             /** Tree doesn't exist yet.
              * Let see if we have a seed/<name> to create it,
              * but only if we come from the 66-enable tool. */
-            if (strcmp(info->prog, "66-enable"))
+            if (!strcmp(info->prog, "66-enable"))
                 return 0 ;
 
             if (!tree_seed_isvalid(info->treename.s))
-- 
GitLab