Skip to content

Commit 48eb231

Browse files
committed
Attempt to fix Windows bots (TBR)
Change-Id: Ieccd570d9472a457a7fa0acece121eba6bfa71e7 Reviewed-on: https://dart-review.googlesource.com/31241 Reviewed-by: Brian Wilkerson <[email protected]>
1 parent 4dfa6a4 commit 48eb231

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pkg/analyzer/lib/src/pubspec/pubspec_validator.dart

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,13 +125,14 @@ class PubspecValidator {
125125
if (flutterField is YamlMap) {
126126
YamlNode assetsField = flutterField.nodes[ASSETS_FIELD];
127127
if (assetsField is YamlList) {
128-
String packageRoot = path.dirname(source.fullName);
128+
path.Context context = provider.pathContext;
129+
String packageRoot = context.dirname(source.fullName);
129130
for (YamlNode entryValue in assetsField.nodes) {
130131
if (entryValue is YamlScalar) {
131132
Object entry = entryValue.value;
132133
if (entry is String) {
133-
String normalizedEntry = path.joinAll(path.posix.split(entry));
134-
String assetPath = path.join(packageRoot, normalizedEntry);
134+
String normalizedEntry = context.joinAll(path.posix.split(entry));
135+
String assetPath = context.join(packageRoot, normalizedEntry);
135136
if (!provider.getFile(assetPath).exists) {
136137
_reportErrorForNode(
137138
reporter,

0 commit comments

Comments
 (0)