Commit 11fea31b by Maarten L. Hekkelman

more loading resources

parent f629275e
...@@ -1236,7 +1236,11 @@ std::unique_ptr<std::istream> loadResource(std::filesystem::path name) ...@@ -1236,7 +1236,11 @@ std::unique_ptr<std::istream> loadResource(std::filesystem::path name)
} }
if (not result and (not fs::exists(p, ec) or ec) and not gDataDir.empty()) if (not result and (not fs::exists(p, ec) or ec) and not gDataDir.empty())
p = gDataDir / name; {
auto p2 = gDataDir / p;
if (fs::exists(p2, ec) and not ec)
swap(p, p2);
}
#if defined(CACHE_DIR) #if defined(CACHE_DIR)
if (not result and (not fs::exists(p, ec) or ec)) if (not result and (not fs::exists(p, ec) or ec))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment