WerWolv / ImHex

🔍 A Hex Editor for Reverse Engineers, Programmers and people who value their retinas when working at 3 AM.
https://imhex.werwolv.net
GNU General Public License v2.0
43.98k stars 1.92k forks source link

[Bug] Impossible to discard unsaved changes #1629

Closed skycommand closed 5 months ago

skycommand commented 5 months ago

Operating System

Windows

What's the issue you encountered?

I opened a file in ImHex and changed a few bytes. I opened the file in Notepad and immediately observed that my changes had been written to the file, even though I never issued a "Save" command.

ImHex has a "Save" command. It must never write changes to disk before the user issues that command.

How can the issue be reproduced?

See above.

ImHex Version

1.33.2

ImHex Build Type

Installation type

MSI

Additional context?

No response

WerWolv commented 5 months ago

This has been improved since. The changes are available in the nightly build but not yet in a full release

paxcut commented 5 months ago

I understand that the issue here is that changes are written to disk without issuing a save command. The reasons for this has been stated before and discussed at length so i won't repeat it here. The wording of the title makes it sound as if ImHex is destroying the data and that it can't be recovered. Discarding the unsaved changes is not only not impossible but it is rather easy even in the version that overwrites the data to disk immediately on edit. Left click undo can be repeated until the file is restored to its original form. Again, I'm not saying that this is how it should be handled or not since that was resolved a while back, but just to mention that in either case (insta-saved edit changes or not) undo is always available in case of doubt.