ImHex icon indicating copy to clipboard operation
ImHex copied to clipboard

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

Open EvelynTSMG opened this issue 1 year ago • 4 comments

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

  • [X] Nightly or built from sources

Installation type

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

Additional context?

No code changes compared to commit

EvelynTSMG avatar Nov 15 '23 23:11 EvelynTSMG

Hey, could you send us the log file ?

iTrooz avatar Nov 15 '23 23:11 iTrooz

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 avatar Nov 15 '23 23:11 EvelynTSMG

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

EvelynTSMG avatar Nov 15 '23 23:11 EvelynTSMG

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

WerWolv avatar Nov 16 '23 08:11 WerWolv