Index: sdk/lib/_internal/pub/lib/src/package.dart |
diff --git a/sdk/lib/_internal/pub/lib/src/package.dart b/sdk/lib/_internal/pub/lib/src/package.dart |
index d899a3e6c5455024f5678986d59261a9bd39efbd..fc2c2b52a9faf83e50aae286286503f597adaaa6 100644 |
--- a/sdk/lib/_internal/pub/lib/src/package.dart |
+++ b/sdk/lib/_internal/pub/lib/src/package.dart |
@@ -146,9 +146,13 @@ class Package { |
// Git always prints files relative to the repository root, but we want |
// them relative to the working directory. It also prints forward slashes |
// on Windows which we normalize away for easier testing. |
- files = files.map((file) => "$dir${path.separator}$file") |
- // Filter out broken symlinks, since git doesn't do so automatically. |
- .where((file) => !linkExists(file) || fileExists(file)); |
+ files = files.map((file) { |
+ if (Platform.operatingSystem != 'windows') return "$dir/$file"; |
+ return "$dir\\${file.replaceAll("/", "\\")}"; |
+ }).where((file) { |
+ // Filter out broken symlinks, since git doesn't do so automatically. |
+ return !linkExists(file) || fileExists(file); |
Bob Nystrom
2014/06/20 16:01:57
Stat-ing each file twice is likely going to be a p
nweiz
2014/06/23 20:27:54
Actually, just fileExists should work, now that I
|
+ }); |
} else { |
files = listDir(beneath, recursive: true, includeDirs: false, |
whitelist: _WHITELISTED_FILES); |