mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-01 16:02:53 +00:00
Shell: A '>' redirection target should be truncated.
This commit is contained in:
parent
d66fa60fcf
commit
dd595fe865
Notes:
sideshowbarker
2024-07-19 13:56:01 +09:00
Author: https://github.com/awesomekling
Commit: dd595fe865
1 changed files with 1 additions and 1 deletions
|
@ -296,7 +296,7 @@ static int run_command(const String& cmd)
|
|||
break;
|
||||
}
|
||||
case Redirection::FileWrite: {
|
||||
int fd = open(redirection.path.characters(), O_WRONLY | O_CREAT, 0666);
|
||||
int fd = open(redirection.path.characters(), O_WRONLY | O_CREAT | O_TRUNC, 0666);
|
||||
if (fd < 0) {
|
||||
perror("open");
|
||||
return 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue