aboutsummaryrefslogtreecommitdiff
path: root/editors/patch.c
diff options
context:
space:
mode:
Diffstat (limited to 'editors/patch.c')
-rw-r--r--editors/patch.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/editors/patch.c b/editors/patch.c
index d5f6df275..e8482a7a9 100644
--- a/editors/patch.c
+++ b/editors/patch.c
@@ -131,9 +131,9 @@ int patch_main(int argc UNUSED_PARAM, char **argv)
131 } else { 131 } else {
132 backup_filename = xasprintf("%s.orig", new_filename); 132 backup_filename = xasprintf("%s.orig", new_filename);
133 xrename(new_filename, backup_filename); 133 xrename(new_filename, backup_filename);
134 src_stream = xfopen(backup_filename, "r"); 134 src_stream = xfopen_for_read(backup_filename);
135 } 135 }
136 dst_stream = xfopen(new_filename, "w"); 136 dst_stream = xfopen_for_write(new_filename);
137 fchmod(fileno(dst_stream), saved_stat.st_mode); 137 fchmod(fileno(dst_stream), saved_stat.st_mode);
138 138
139 printf("patching file %s\n", new_filename); 139 printf("patching file %s\n", new_filename);