diff options
| -rw-r--r-- | src/cli/stasis_indexer/stasis_indexer_main.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/cli/stasis_indexer/stasis_indexer_main.c b/src/cli/stasis_indexer/stasis_indexer_main.c index 6f430c2..ca0fc07 100644 --- a/src/cli/stasis_indexer/stasis_indexer_main.c +++ b/src/cli/stasis_indexer/stasis_indexer_main.c @@ -29,6 +29,8 @@ int indexer_combine_rootdirs(const char *dest, char **rootdirs, const size_t roo puts("sprintf 1"); snprintf(cmd, sizeof(cmd), "rsync -ah%s --delete --exclude 'tools/' --exclude 'tmp/' --exclude 'build/' ", globals.verbose ? "v" : "q"); for (size_t i = 0; i < rootdirs_total; i++) { + printf("i = %zu (rootdirs_total = %zu)\n", i, rootdirs_total); + char srcdir_bare[PATH_MAX] = {0}; char srcdir_with_output[PATH_MAX] = {0}; char *srcdir = srcdir_bare; @@ -45,22 +47,26 @@ int indexer_combine_rootdirs(const char *dest, char **rootdirs, const size_t roo fprintf(stderr, "%s does not exist\n", srcdir_bare); continue; } + puts("done"); puts("access srcdir_with_output"); if (!access(srcdir_with_output, F_OK)) { srcdir = srcdir_with_output; } + puts("done"); puts("snprintf 2"); printf("cmd = %s\n", cmd); printf("cmd len = %zu\n", strlen(cmd)); printf("cmd size = %zu\n", sizeof(cmd)); - printf("cmd maxlen = %zu\n", sizeof(cmd) - strlen(cmd) + 4); + printf("cmd maxlen = %zu\n", sizeof(cmd) - strlen(cmd)); printf("srcdir = %s\n", srcdir); - snprintf(cmd + strlen(cmd), sizeof(cmd) - strlen(cmd) + 4, "'%s'/ ", srcdir); + snprintf(cmd + strlen(cmd), sizeof(cmd) - strlen(cmd), "'%s'/ ", srcdir); + puts("done"); puts(cmd); } puts("snprintf 3"); - snprintf(cmd + strlen(cmd), sizeof(cmd) - strlen(cmd) + 2, " %s/", destdir); + snprintf(cmd + strlen(cmd), sizeof(cmd) - strlen(cmd), " %s/", destdir); + puts("done"); if (globals.verbose) { puts(cmd); @@ -70,6 +76,7 @@ int indexer_combine_rootdirs(const char *dest, char **rootdirs, const size_t roo if (system(cmd)) { return -1; } + puts("done"); return 0; } |
