mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-28 07:47:03 -05:00
fix: Pattern files not getting truncated correctly when saving
Fixes #2566
(cherry picked from commit 932c281223)
This commit is contained in:
@@ -2641,7 +2641,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()));
|
||||
|
||||
Reference in New Issue
Block a user