tshow when chdir failed for -r root option - dedup - deduplicating backup program
(HTM) git clone git://git.z3bra.org/dedup.git
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit b32ea21f3ef521f3f1dd9d908e499df4c83b895a
(DIR) parent 115a93564d2c1cba04b4a2f0ace7dfbd52906bb4
(HTM) 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
t@@ -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();