Give Resource Providers a chance to load files.

File resolution only checks local file system. Resource providers may still
be able to load from a path even if it is not resolved.

PiperOrigin-RevId: 867534134
Change-Id: I802566136b965ad839393f56a4d4924dda2e1973
This commit is contained in:
Haroon Qureshi
2026-02-09 04:23:00 -08:00
committed by Copybara-Service
parent 8557cf201b
commit be93e8eeb2
2 changed files with 1 additions and 7 deletions
+1 -1
View File
@@ -84,7 +84,7 @@ std::string ResolveFile(const std::string& filename,
}
}
}
return "";
return filename;
}
void SaveToWebp(int width, int height, const std::byte* data,
-6
View File
@@ -145,14 +145,8 @@ void App::InitEmptyModel() {
}
void App::LoadModelFromFile(const std::string& filepath) {
const std::string resolved_file =
platform::ResolveFile(filepath, search_paths_);
if (resolved_file.empty()) {
SetLoadError("File not found: " + filepath);
return;
}
model_holder_ = platform::ModelHolder::FromFile(resolved_file);
if (model_holder_->ok()) {
OnModelLoaded(filepath, kModelFromFile);