mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-04-20 00:02:55 +00:00
Unlinker: Check if a file exists before attempting to load it
This commit is contained in:
parent
dde77901a3
commit
10342a7b58
@ -391,6 +391,13 @@ public:
|
|||||||
for (unsigned argIndex = 1; argIndex < argCount; argIndex++)
|
for (unsigned argIndex = 1; argIndex < argCount; argIndex++)
|
||||||
{
|
{
|
||||||
const std::string& zonePath = arguments[argIndex];
|
const std::string& zonePath = arguments[argIndex];
|
||||||
|
|
||||||
|
if(!FileAPI::FileExists(zonePath))
|
||||||
|
{
|
||||||
|
printf("Could not find file \"%s\".\n", zonePath.c_str());
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
std::string absoluteZoneDirectory = absolute(std::filesystem::path(zonePath).remove_filename()).string();
|
std::string absoluteZoneDirectory = absolute(std::filesystem::path(zonePath).remove_filename()).string();
|
||||||
|
|
||||||
SearchPaths searchPathsForZone = GetSearchPathsForZone(absoluteZoneDirectory);
|
SearchPaths searchPathsForZone = GetSearchPathsForZone(absoluteZoneDirectory);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user