File tree 1 file changed +4
-3
lines changed
pkg/analyzer/lib/src/pubspec
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -125,13 +125,14 @@ class PubspecValidator {
125
125
if (flutterField is YamlMap ) {
126
126
YamlNode assetsField = flutterField.nodes[ASSETS_FIELD ];
127
127
if (assetsField is YamlList ) {
128
- String packageRoot = path.dirname (source.fullName);
128
+ path.Context context = provider.pathContext;
129
+ String packageRoot = context.dirname (source.fullName);
129
130
for (YamlNode entryValue in assetsField.nodes) {
130
131
if (entryValue is YamlScalar ) {
131
132
Object entry = entryValue.value;
132
133
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);
135
136
if (! provider.getFile (assetPath).exists) {
136
137
_reportErrorForNode (
137
138
reporter,
You can’t perform that action at this time.
0 commit comments