From 2830d2cddb1b2d2e8a968b52f3193a52fc32dd4c Mon Sep 17 00:00:00 2001 From: Raymond Pasco Date: Thu, 19 Nov 2015 16:01:58 -0500 Subject: [PATCH] Allow optional pier directory argument with -w -t --- vere/main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vere/main.c b/vere/main.c index bcd1bd005..a17b26285 100644 --- a/vere/main.c +++ b/vere/main.c @@ -95,7 +95,6 @@ _main_getopt(c3_i argc, c3_c** argv) case 'w': { u3_Host.ops_u.who_c = _main_presig(optarg); u3_Host.ops_u.nuu = c3y; - u3_Host.dir_c = strdup(1 + u3_Host.ops_u.who_c); break; } case 't': { @@ -198,6 +197,10 @@ _main_getopt(c3_i argc, c3_c** argv) } } + 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 {