aboutsummaryrefslogtreecommitdiffstats
path: root/src/u_utils.c
diff options
context:
space:
mode:
authorjozan <jozan@noemail.net>2020-11-06 04:11:06 +0000
committerjozan <jozan@noemail.net>2020-11-06 04:11:06 +0000
commit7676870f31ae5ceab29815d5c65f497f4ecf9c83 (patch)
tree0d3659204203453576960b4f0d8a81352eadafb2 /src/u_utils.c
parentMust reparse options (diff)
downloadunixize-7676870f31ae5ceab29815d5c65f497f4ecf9c83.tar.gz
unixize-7676870f31ae5ceab29815d5c65f497f4ecf9c83.tar.bz2
unixize-7676870f31ae5ceab29815d5c65f497f4ecf9c83.tar.xz
unixize-7676870f31ae5ceab29815d5c65f497f4ecf9c83.tar.zst
unixize-7676870f31ae5ceab29815d5c65f497f4ecf9c83.zip
A lot of work done, now subst
FossilOrigin-Name: 3850b6d394b367ed98a7493dfb137f43f27372b7ba3ed4eeef4459597bb2d69f
Diffstat (limited to 'src/u_utils.c')
-rw-r--r--src/u_utils.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/u_utils.c b/src/u_utils.c
index 4c1a9ed..b5f0b45 100644
--- a/src/u_utils.c
+++ b/src/u_utils.c
@@ -49,6 +49,7 @@
#include <string.h>
#include <unistd.h>
+#include "c_opts.h"
#include "c_unixize.h"
void
@@ -139,12 +140,14 @@ u_get_nargv(struct opts_s* opts)
u_dump_errno();
return (NULL);
}
- nargv[0] = strdup("r");
+ nargv[0] = (char*)malloc(2 * sizeof(char));
nargv[1] = NULL;
if (nargv[0] == NULL) {
u_memdel((void*)&nargv);
return (NULL);
}
+ nargv[0][0] = C_RECURSIVE_CHAR;
+ nargv[0][1] = 0x00;
nargv[1] = strdup("-R");
nargv[2] = NULL;
if (nargv[1] == NULL) {