Fix snapshotter deps file output (flutter/engine#2593)

- [x] Add the path not the url to the dependencies
This commit is contained in:
John McCutchan
2016-04-12 09:48:19 -07:00
parent 25eff9fadf
commit 6c60410c09

View File

@@ -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;
}