Skip to content

Commit be93e8e

Browse files
haroonqcopybara-github
authored andcommitted
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
1 parent 8557cf2 commit be93e8e

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

src/experimental/platform/helpers.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ std::string ResolveFile(const std::string& filename,
8484
}
8585
}
8686
}
87-
return "";
87+
return filename;
8888
}
8989

9090
void SaveToWebp(int width, int height, const std::byte* data,

src/experimental/studio/app.cc

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -145,14 +145,8 @@ void App::InitEmptyModel() {
145145
}
146146

147147
void App::LoadModelFromFile(const std::string& filepath) {
148-
149148
const std::string resolved_file =
150149
platform::ResolveFile(filepath, search_paths_);
151-
if (resolved_file.empty()) {
152-
SetLoadError("File not found: " + filepath);
153-
return;
154-
}
155-
156150
model_holder_ = platform::ModelHolder::FromFile(resolved_file);
157151
if (model_holder_->ok()) {
158152
OnModelLoaded(filepath, kModelFromFile);

0 commit comments

Comments
 (0)