version 1.28, 2019/06/23 10:28:32 |
version 1.29, 2019/06/27 18:03:37 |
|
|
/* Our path defaults to "." for the root. */ |
/* Our path defaults to "." for the root. */ |
|
|
if (ent->fts_path[stripdir] == '\0') { |
if (ent->fts_path[stripdir] == '\0') { |
if (asprintf(&f->path, "%s.", ent->fts_path) < 0) { |
if (asprintf(&f->path, "%s.", ent->fts_path) == -1) { |
ERR("asprintf"); |
ERR("asprintf"); |
f->path = NULL; |
f->path = NULL; |
goto out; |
goto out; |
|
|
if (wflsz && strcmp(wfl[0].wpath, ".") == 0) { |
if (wflsz && strcmp(wfl[0].wpath, ".") == 0) { |
assert(cargvs == 1); |
assert(cargvs == 1); |
assert(S_ISDIR(wfl[0].st.mode)); |
assert(S_ISDIR(wfl[0].st.mode)); |
if (asprintf(&cargv[0], "%s/", root) < 0) { |
if (asprintf(&cargv[0], "%s/", root) == -1) { |
ERR("asprintf"); |
ERR("asprintf"); |
cargv[0] = NULL; |
cargv[0] = NULL; |
goto out; |
goto out; |
|
|
assert(S_ISDIR(wfl[i].st.mode)); |
assert(S_ISDIR(wfl[i].st.mode)); |
assert(strcmp(wfl[i].wpath, ".")); |
assert(strcmp(wfl[i].wpath, ".")); |
c = asprintf(&cargv[j], "%s/%s", root, wfl[i].wpath); |
c = asprintf(&cargv[j], "%s/%s", root, wfl[i].wpath); |
if (c < 0) { |
if (c == -1) { |
ERR("asprintf"); |
ERR("asprintf"); |
cargv[j] = NULL; |
cargv[j] = NULL; |
goto out; |
goto out; |