Blame SOURCES/patch-2.7.1-newmode.patch

5c22bb
diff -up patch-2.7.1/src/patch.c.newmode patch-2.7.1/src/patch.c
5c22bb
--- patch-2.7.1/src/patch.c.newmode	2018-11-26 15:23:49.990764455 +0100
5c22bb
+++ patch-2.7.1/src/patch.c	2018-11-26 15:27:55.307567239 +0100
5c22bb
@@ -560,8 +560,11 @@ main (int argc, char **argv)
5c22bb
 			}
5c22bb
 
5c22bb
 		      if (inerrno)
5c22bb
-			set_file_attributes (TMPOUTNAME, attr, NULL, NULL,
5c22bb
+			{
5c22bb
+			  if (set_mode) attr |= FA_MODE;
5c22bb
+			  set_file_attributes (TMPOUTNAME, attr, NULL, NULL,
5c22bb
 					     mode, &new_time);
5c22bb
+			}
5c22bb
 		      else
5c22bb
 			{
5c22bb
 			  attr |= FA_IDS | FA_MODE | FA_XATTRS;