mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:48:12 +00:00
Meta: Truncate generated IDL source files
3dd3120a8a
changed open mode from Write to
ReadWrite, which stopped truncating files.
This could be noticed by building a slightly older branch, as compiling
it gave compile errors.
This commit is contained in:
parent
49df2e1e3a
commit
d94a0623d0
1 changed files with 1 additions and 1 deletions
|
@ -128,7 +128,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
auto write_if_changed = [&](auto generator_function, StringView file_path) -> ErrorOr<void> {
|
||||
(*generator_function)(interface, output_builder);
|
||||
|
||||
auto output_file = TRY(Core::File::open(file_path, Core::File::OpenMode::ReadWrite));
|
||||
auto output_file = TRY(Core::File::open(file_path, Core::File::OpenMode::ReadWrite | Core::File::OpenMode::Truncate));
|
||||
|
||||
// Only write to disk if contents have changed
|
||||
auto previous_contents = TRY(output_file->read_until_eof());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue