1
0
mirror of synced 2024-11-28 01:20:51 +01:00

fix: ImHex hanging at startup in certain cases

This commit is contained in:
WerWolv 2024-06-29 21:13:04 +02:00
parent 6fd594c1f4
commit f90dc5d619

View File

@ -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;