summaryrefslogtreecommitdiff
path: root/src/patch.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/patch.c')
-rw-r--r--src/patch.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/patch.c b/src/patch.c
index bba7e0e..0fe6d72 100644
--- a/src/patch.c
+++ b/src/patch.c
@@ -590,8 +590,12 @@ main (int argc, char **argv)
}
if (inerrno)
- set_file_attributes (TMPOUTNAME, attr, NULL, NULL,
- mode, &new_time);
+ {
+ if (set_mode)
+ attr |= FA_MODE;
+ set_file_attributes (TMPOUTNAME, attr, NULL, NULL,
+ mode, &new_time);
+ }
else
{
attr |= FA_IDS | FA_MODE | FA_XATTRS;