show when chdir failed for -r root option - dedup - deduplicating backup program HTML git clone git://bitreich.org/dedup/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/dedup/ DIR Log DIR Files DIR Refs DIR Tags DIR README DIR LICENSE --- DIR commit b32ea21f3ef521f3f1dd9d908e499df4c83b895a DIR parent 115a93564d2c1cba04b4a2f0ace7dfbd52906bb4 HTML Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Wed, 21 Mar 2018 18:55:55 +0100 show when chdir failed for -r root option Diffstat: M dedup.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- DIR diff --git a/dedup.c b/dedup.c @@ -585,7 +585,8 @@ main(int argc, char *argv[]) if (root != NULL) { mkdir(root, 0700); - chdir(root); + if (chdir(root) < 0) + err(1, "chdir: %s", root); } init();