Skip to content

[Bug] Default paths are not created if they do not exist #2726

@Poooel

Description

@Poooel

Operating System

Linux

What's the issue you encountered?

The change introduced in 31c1db8 created an issue where if your ImHex folders are not present, they won't be created.
As you updated the check to path->write() from path->all(), if the folder doesn't exist, path->write() will return false for every path, as it tries to create a temporary file in a directory that doesn't exist.

for (auto &folder : path->write()) {

I'm not sure the fix is simply reverting the line if you want to keep the spirit of the commit.

How can the issue be reproduced?

On Linux, delete the local folder in ~/.config/imhex and ~/.local/share/imhex.
Launch the app, update your settings for example, relaunch the app, the settings have not been saved, the folders have not been created.

ImHex Version

58cde7a

ImHex Build Type

  • Nightly or built from sources

Installation type

From sources

Additional context?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions