mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Merge pull request #588 from abarth/fix_abs_paths
sky_snapshot should work with absolute paths
This commit is contained in:
commit
75af6ce486
@ -25,8 +25,10 @@ std::string Fetch(const std::string& url) {
|
||||
base::FilePath SimplifyPath(const base::FilePath& path) {
|
||||
std::vector<base::FilePath::StringType> components;
|
||||
path.GetComponents(&components);
|
||||
base::FilePath result;
|
||||
for (const auto& component : components) {
|
||||
auto it = components.begin();
|
||||
base::FilePath result(*it++);
|
||||
for (; it != components.end(); it++) {
|
||||
auto& component = *it;
|
||||
if (component == base::FilePath::kCurrentDirectory)
|
||||
continue;
|
||||
if (component == base::FilePath::kParentDirectory)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user