Fix snapshotter deps file output (flutter/engine#2593)
- [x] Add the path not the url to the dependencies
This commit is contained in:
@@ -161,13 +161,14 @@ std::string Loader::GetFilePathForFileURL(std::string url) {
|
||||
}
|
||||
|
||||
std::string Loader::Fetch(const std::string& url) {
|
||||
base::FilePath path(GetFilePathForURL(url));
|
||||
std::string url_path = GetFilePathForURL(url);
|
||||
base::FilePath path(url_path);
|
||||
std::string source;
|
||||
if (!base::ReadFileToString(path, &source)) {
|
||||
fprintf(stderr, "error: Unable to find Dart library '%s'.\n", url.c_str());
|
||||
exit(1);
|
||||
}
|
||||
dependencies_.insert(url);
|
||||
dependencies_.insert(url_path);
|
||||
return source;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user