From e68a2a25d98f6f133894fe93b5b5f71c8109abb1 Mon Sep 17 00:00:00 2001 From: ~hatteb-mitlyd Date: Thu, 15 May 2014 17:34:24 -0700 Subject: [PATCH] attempt to sync out files at toplevel --- v/unix.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/v/unix.c b/v/unix.c index 1dc8f20bf..66096ece5 100644 --- a/v/unix.c +++ b/v/unix.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include @@ -990,10 +989,17 @@ _unix_desk_sync_tofu(u2_udir* dir_u, static void _unix_desk_sync_tako(u2_udir* dir_u, u2_noun pax, u2_noun mis) { - if ( (u2_no == u2du(pax)) || u2_no == u2du(u2t(pax)) ) { - c3_assert(0); + if ( (u2_no == u2du(pax)) ) { + c3_assert(!"tack"); + } + else if ( u2_no == u2du(u2t(pax)) ) { // at toplevel + u2_noun i_pax = u2h(pax); + u2_noun t_pax = u2t(pax); + c3_c* par_u = strrchr(dir_u->pax_c, '/'); + u2_noun pem = u2_ci_string(par_u); + c3_assert( u2_nul == t_pax ); // XX ugly, wrong - u2z(pax); u2z(mis); + _unix_desk_sync_tofu(dir_u->par_u, pem, u2k(i_pax), mis); } else { u2_noun i_pax = u2h(pax);