Mercurial > hg > toybox
changeset 827:98c396477e0b
Fix a bug in patch I fixed back in 2010 but forgot to apply here.
author | Rob Landley <rob@landley.net> |
---|---|
date | Thu, 21 Mar 2013 23:23:49 -0500 |
parents | 457d4cdc937e |
children | 1fdaba9a7124 |
files | toys/posix/patch.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/toys/posix/patch.c Thu Mar 21 20:21:12 2013 -0500 +++ b/toys/posix/patch.c Thu Mar 21 23:23:49 2013 -0500 @@ -394,7 +394,7 @@ TT.filein = xcreate(name, O_CREAT|O_EXCL|O_RDWR, 0666); } else { printf("patching %s\n", name); - TT.filein = xopen(name, O_RDWR); + TT.filein = xopen(name, O_RDONLY); } TT.fileout = copy_tempfile(TT.filein, name, &TT.tempname); TT.linenum = 0;