mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 05:39:11 +00:00
Kernel: Add Inode::truncate(size).
- Use this to implement the O_TRUNC open flag. - Fix creat() to pass O_CREAT | O_TRUNC | O_WRONLY. - Make sure we truncate wherever appropriate.
This commit is contained in:
parent
e9f2cc3595
commit
0058da734e
Notes:
sideshowbarker
2024-07-19 14:55:24 +09:00
Author: https://github.com/awesomekling
Commit: 0058da734e
8 changed files with 26 additions and 8 deletions
|
@ -143,7 +143,7 @@ RetainPtr<Font> Font::load_from_file(const String& path)
|
|||
|
||||
bool Font::write_to_file(const String& path)
|
||||
{
|
||||
int fd = open(path.characters(), O_WRONLY | O_CREAT, 0644);
|
||||
int fd = creat(path.characters(), 0644);
|
||||
if (fd < 0) {
|
||||
perror("open");
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue