Fix for #3 and maximum scan depth

This commit is contained in:
2019-11-19 11:23:30 -05:00
parent 893ff145c5
commit 373ac01e4e
10 changed files with 33 additions and 9 deletions

View File

@@ -14,6 +14,9 @@
scan_args_t *scan_args_create() {
scan_args_t *args = calloc(sizeof(scan_args_t), 1);
args->depth = -1;
return args;
}
@@ -80,6 +83,12 @@ int scan_args_validate(scan_args_t *args, int argc, const char **argv) {
return 1;
}
if (args->depth < 0) {
args->depth = G_MAXINT32;
} else {
args->depth += 1;
}
if (args->name == NULL) {
args->name = g_path_get_basename(args->output);
}