Fix import dialog when a texture could not be found

metadata
Wenzel Jakob 2010-09-14 11:58:18 +02:00
parent 41f640cfe5
commit 18390c39b2
2 changed files with 2 additions and 2 deletions

View File

@ -874,7 +874,7 @@ void loadImage(GeometryConverter *cvt, std::ostream &os, const fs::path &texture
resolved = fRes->resolve(path.leaf());
if (!fs::exists(resolved)) {
SLog(EWarn, "Found neither \"%s\" nor \"%s\"!", filename.c_str(), resolved.file_string().c_str());
resolved = cvt->locateResource(filename);
resolved = cvt->locateResource(path.leaf());
if (resolved.empty())
SLog(EError, "Unable to locate a resource -- aborting conversion.");
}

View File

@ -38,7 +38,7 @@ std::string copyTexture(GeometryConverter *cvt, const fs::path &textureDir, std:
resolved = fRes->resolve(path.leaf());
if (!fs::exists(resolved)) {
SLog(EWarn, "Found neither \"%s\" nor \"%s\"!", filename.c_str(), resolved.file_string().c_str());
resolved = cvt->locateResource(filename);
resolved = cvt->locateResource(path.leaf());
if (resolved.empty())
SLog(EError, "Unable to locate a resource -- aborting conversion.");
}