mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-30 21:05:56 -05:00
Fix: ignore non-existent magic directories (#215)
This commit is contained in:
@@ -105,6 +105,9 @@ namespace hex {
|
||||
|
||||
std::error_code error;
|
||||
for (const auto &dir : hex::getPath(ImHexPath::Magic)) {
|
||||
if (!std::filesystem::is_directory(dir))
|
||||
continue;
|
||||
|
||||
for (const auto &entry : std::filesystem::directory_iterator(dir, error)) {
|
||||
if (entry.is_regular_file() && entry.path().extension() == ".mgc")
|
||||
magicFiles += entry.path().string() + MAGIC_PATH_SEPARATOR;
|
||||
|
||||
Reference in New Issue
Block a user