diff options
Diffstat (limited to 'tests/dumptrees.c')
-rw-r--r-- | tests/dumptrees.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/dumptrees.c b/tests/dumptrees.c index b2f5b26..aecb326 100644 --- a/tests/dumptrees.c +++ b/tests/dumptrees.c @@ -32,6 +32,16 @@ int main(int argc, char *argv[]) { int i; + if (argc != 2) { + fprintf(stderr, "Missing output directory argument\n"); + return 1; + } + + if (chdir(argv[1]) != 0) { + perror("chdir()"); + return 1; + } + for (i = 0; i < NUM_TREES; i++) { void *blob = trees[i].blob; const char *filename = trees[i].filename; |