Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(733)

Unified Diff: pkg/glob/lib/glob.dart

Issue 607963002: Fix glob list on Windows. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/glob/lib/src/ast.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/glob/lib/glob.dart
diff --git a/pkg/glob/lib/glob.dart b/pkg/glob/lib/glob.dart
index f80faa1647b15c2bfb6848e0b2819bcb9b4a7281..2d2a83f6a9b3a0d4e0b5034d18c19f476e7b2e55 100644
--- a/pkg/glob/lib/glob.dart
+++ b/pkg/glob/lib/glob.dart
@@ -155,14 +155,14 @@ class Glob implements Pattern {
if (_patternCanMatchAbsolute &&
(_contextIsAbsolute || context.isAbsolute(path))) {
var absolutePath = context.normalize(context.absolute(path));
- if (_ast.matches(_toPosixPath(absolutePath))) {
+ if (_ast.matches(toPosixPath(context, absolutePath))) {
return new GlobMatch(path, this);
}
}
if (_patternCanMatchRelative) {
var relativePath = context.relative(path);
- if (_ast.matches(_toPosixPath(relativePath))) {
+ if (_ast.matches(toPosixPath(context, relativePath))) {
return new GlobMatch(path, this);
}
}
@@ -170,13 +170,6 @@ class Glob implements Pattern {
return null;
}
- /// Returns [path] converted to the POSIX format that globs match against.
- String _toPosixPath(String path) {
- if (context.style == p.Style.windows) return path.replaceAll('\\', '/');
- if (context.style == p.Style.url) return Uri.decodeFull(path);
- return path;
- }
-
Iterable<Match> allMatches(String path, [int start = 0]) {
var match = matchAsPrefix(path, start);
return match == null ? [] : [match];
« no previous file with comments | « no previous file | pkg/glob/lib/src/ast.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698