Allow optional pier directory argument with -w -t

This commit is contained in:
Raymond Pasco 2015-11-19 16:01:58 -05:00
parent 38456edc4e
commit 2830d2cddb

View File

@ -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 {