Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] "Save As..." Modifies Both the New File and the Original File #1585

Closed
1 task
Thysbelon opened this issue Mar 6, 2024 · 1 comment
Closed
1 task
Labels
bug Something isn't working

Comments

@Thysbelon
Copy link

Thysbelon commented Mar 6, 2024

Operating System

Linux

What's the issue you encountered?

Opening a file, modifying it, then clicking "save as..." will write the changes to both the new file and the original. I expected it to only write changes to the new file.

How can the issue be reproduced?

  1. In the OS's file manager: create a file named "original.txt" with the content "original"
  2. Open "orignal.txt" in ImHex
  3. Double click the ascii content and type "altered "
  4. Click file>save as...; set the name of the new file to "altered.txt"
  5. Close ImHex
  6. Open original.txt and altered.txt in a text viewer and observe that both text files contain the content "altered "

ImHex Version

1.33.1

ImHex Build Type

  • Nightly or built from sources

Installation type

AppImage

Additional context?

  • OS: Ubuntu 23.10
  • Issue occurs on both the 1.33.1 release and the 1.33.0 nightly, both of which were downloaded from the official website
@Thysbelon Thysbelon added the bug Something isn't working label Mar 6, 2024
@RetroEdit
Copy link

The linked issue has some useful discussion, but I'll summarize that ImHex will automatically save changes as soon as you do them, so this is expected behavior. This is so large files can be modified without loading the whole file into memory. Basically, you probably have to save to a new file before making changes if you don't want them to apply to the old file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants