fix: Pattern files not getting truncated correctly when saving

Fixes #2566
This commit is contained in:
WerWolv 2025-12-16 10:02:10 +01:00
parent 858fe0384e
commit 932c281223
1 changed files with 1 additions and 1 deletions

View File

@ -2652,7 +2652,7 @@ namespace hex::plugin::builtin {
if (provider == nullptr)
return;
auto path = m_changeTracker.get(provider).getPath();
wolv::io::File file(path, wolv::io::File::Mode::Write);
wolv::io::File file(path, wolv::io::File::Mode::Create);
if (file.isValid() && trackFile) {
if (isPatternDirty(provider)) {
file.writeString(wolv::util::trim(m_textEditor.get(provider).getText()));