Skip to content

Commit

Permalink
fix: ImHex hanging at startup in certain cases
Browse files Browse the repository at this point in the history
  • Loading branch information
WerWolv committed Jun 29, 2024
1 parent 6fd594c commit f90dc5d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions main/gui/source/init/tasks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,15 @@ namespace hex::init {
}

static bool isSubPathWritable(std::fs::path path) {
while (path.root_directory() != path) {
for (u32 i = 0; i < 128; i++) {
if (hex::fs::isPathWritable(path))
return true;

path = path.parent_path();
auto parentPath = path.parent_path();
if (parentPath == path)
break;

path = std::move(parentPath);
}

return false;
Expand Down

0 comments on commit f90dc5d

Please sign in to comment.