summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/tools/files.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/tools/files.c b/src/tools/files.c
index 10fd6fe4..186f18b9 100644
--- a/src/tools/files.c
+++ b/src/tools/files.c
@@ -703,6 +703,7 @@ copy_dir(struct copy_ctx *cctx,
* reset these bits. */
ret = fchmod(dest_dir_fd, mode);
if (ret == -1) {
+ ret = errno;
DEBUG(SSSDBG_OP_FAILURE,
("Error setting mode of '%s': %s",
dest_dir_path, strerror(ret)));