From 4fba951658710035a1ae60b71c019ab3f5ef2903 Mon Sep 17 00:00:00 2001 From: Joe Bryan Date: Fri, 17 May 2019 14:36:55 -0700 Subject: [PATCH] removes incorrect early return in cli argument-parsing --- pkg/urbit/daemon/main.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/pkg/urbit/daemon/main.c b/pkg/urbit/daemon/main.c index d6d197dcd8..0fb9ce51e6 100644 --- a/pkg/urbit/daemon/main.c +++ b/pkg/urbit/daemon/main.c @@ -212,13 +212,16 @@ _main_getopt(c3_i argc, c3_c** argv) u3_Host.ops_u.nuu = c3y; } - if ( argc != (optind + 1) && u3_Host.ops_u.who_c != 0 ) { - u3_Host.dir_c = strdup(1 + u3_Host.ops_u.who_c); - } - if ( argc != (optind + 1) ) { - return u3_Host.dir_c ? c3y : c3n; - } else { + if ( u3_Host.ops_u.who_c != 0 ) { + u3_Host.dir_c = strdup(1 + u3_Host.ops_u.who_c); + } + else { + // XX not sure how this might be reachable + return c3n; + } + } + else { { c3_c* ash_c;