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

Unified Diff: pkg/analyzer/lib/src/generated/bazel.dart

Issue 2502103003: Change BazelWorkspace so that it checks the main source directory before READONLY. (Closed)
Patch Set: Created 4 years, 1 month 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/analyzer/test/generated/bazel_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/bazel.dart
diff --git a/pkg/analyzer/lib/src/generated/bazel.dart b/pkg/analyzer/lib/src/generated/bazel.dart
index b81a0c8aee07dbc0f8023b8548ff91b7b060c722..64fbcc0fa32fb7b73e7a8271a2a0c62fd4d84ee0 100644
--- a/pkg/analyzer/lib/src/generated/bazel.dart
+++ b/pkg/analyzer/lib/src/generated/bazel.dart
@@ -197,6 +197,11 @@ class BazelWorkspace {
return file;
}
}
+ // Writable
+ File writableFile = provider.getFile(absolutePath);
+ if (writableFile.exists) {
+ return writableFile;
+ }
// READONLY
if (readonly != null) {
File file = provider.getFile(context.join(readonly, relative));
@@ -205,7 +210,7 @@ class BazelWorkspace {
}
}
// Not generated, return the default one.
- return provider.getFile(absolutePath);
+ return writableFile;
} catch (_) {
return null;
}
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/bazel_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698