aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2004-04-21 00:57:14 +0000
committerEric Andersen <andersen@codepoet.org>2004-04-21 00:57:14 +0000
commitb94669543df39440415d734ad2932a83651471e9 (patch)
tree65271f4cab4661aa2fa0c5d2b66554752ffeafd9
parentfaa7d863fcdfe380a173cf7a005f481066bef703 (diff)
downloadbusybox-w32-b94669543df39440415d734ad2932a83651471e9.tar.gz
busybox-w32-b94669543df39440415d734ad2932a83651471e9.tar.bz2
busybox-w32-b94669543df39440415d734ad2932a83651471e9.zip
This sed patch can only be described as "duh". Stat the source file, chmod
the _destination_ file. (Ah hah! That works _much_ better...) I implemented the behavior, I just forgot to test this corner of it. My fault, sorry... No, gnu sed -i doesn't preverve ownership information. I checked. Permissions, yes, ownership info, no. Rob
-rw-r--r--editors/sed.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/editors/sed.c b/editors/sed.c
index 968d0d2a2..750f41acd 100644
--- a/editors/sed.c
+++ b/editors/sed.c
@@ -1191,7 +1191,7 @@ extern int sed_main(int argc, char **argv)
1191 nonstdout=bb_wfopen(outname,"w"); 1191 nonstdout=bb_wfopen(outname,"w");
1192 /* Set permissions of output file */ 1192 /* Set permissions of output file */
1193 fstat(fileno(file),&statbuf); 1193 fstat(fileno(file),&statbuf);
1194 fchmod(fileno(file),statbuf.st_mode); 1194 fchmod(fileno(nonstdout),statbuf.st_mode);
1195 atexit(cleanup_outname); 1195 atexit(cleanup_outname);
1196 } 1196 }
1197 process_file(file); 1197 process_file(file);