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.78k stars 1.91k forks source link

[Bug] Symlink in themes folder prevents built-in plugins from loading #1428

Open EvelynTSMG opened 10 months ago

EvelynTSMG commented 10 months ago

Operating System

Windows

What's the issue you encountered?

I created a symlink to a theme file in the themes folder I tried to open ImHex It broke

How can the issue be reproduced?

  1. Export a new theme using the Theme Manager
  2. Create a symlink to it with mklink C:\Users\%USERNAME%\AppData\Local\imhex\themes\theme.json .\theme.json
  3. (Re)Open ImHex

ImHex Version

dd2ecb3

ImHex Build Type

Installation type

ninja -j8 install, why is this field required when building from sources

Additional context?

No code changes compared to commit

iTrooz commented 10 months ago

Hey, could you send us the log file ?

EvelynTSMG commented 10 months ago

20231115_181044.log Presumably, ImHex tries to open it as a json file, while in reality it's a symlink which it should attempt to follow to the actual file

EvelynTSMG commented 10 months ago

As a quick sidenote, opening the symlink in ImHex caused a new file to be made image

WerWolv commented 10 months ago

The issue is quite simply, ImHex never tries to follow symlinks. Honestly I'm also not sure if it actually should since symlinks can introduce a whole new kind of errors we and users will have to deal with if they're used improperly