Index: utils/pub/io.dart |
diff --git a/utils/pub/io.dart b/utils/pub/io.dart |
index 63879b3128a151d25f45a3a8d35b4794f243d878..0ecc7b2498942789d4dbbabfa8db420dec1a3bdb 100644 |
--- a/utils/pub/io.dart |
+++ b/utils/pub/io.dart |
@@ -74,7 +74,7 @@ List<String> splitPath(path) => _sanitizePath(path).split('/'); |
/// performs a path comparison; it doesn't look at the actual filesystem. |
bool isBeneath(entry, dir) { |
var relative = relativeTo(entry, dir); |
- return !path.isAbsolute(relative) && !relative.startsWith('..'); |
+ return !path.isAbsolute(relative) && splitPath(relative)[0] != '..'; |
} |
// TODO(nweiz): move this into path.dart. |