mirror of
https://github.com/sheumann/hush.git
synced 2024-08-20 04:28:57 +00:00
ash: <> redir should not truncate
Signed-off-by: Andreas Bühmann <buehmann@users.berlios.de> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
1b8e2b0e76
commit
da75f44844
@ -4938,7 +4938,7 @@ openredirect(union node *redir)
|
||||
break;
|
||||
case NFROMTO:
|
||||
fname = redir->nfile.expfname;
|
||||
f = open(fname, O_RDWR|O_CREAT|O_TRUNC, 0666);
|
||||
f = open(fname, O_RDWR|O_CREAT, 0666);
|
||||
if (f < 0)
|
||||
goto ecreate;
|
||||
break;
|
||||
|
2
shell/ash_test/ash-redir/redir9.right
Normal file
2
shell/ash_test/ash-redir/redir9.right
Normal file
@ -0,0 +1,2 @@
|
||||
Ok
|
||||
Done:0
|
4
shell/ash_test/ash-redir/redir9.tests
Normal file
4
shell/ash_test/ash-redir/redir9.tests
Normal file
@ -0,0 +1,4 @@
|
||||
echo Ok >file.tmp
|
||||
cat 0<>file.tmp
|
||||
echo Done:$?
|
||||
rm file.tmp
|
Loading…
Reference in New Issue
Block a user