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

Unified Diff: tools/migration/lib/src/io.dart

Issue 3004073002: Remove corelib/corelib_strong and migrate last two remaining tests. (Closed)
Patch Set: Created 3 years, 4 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
Index: tools/migration/lib/src/io.dart
diff --git a/tools/migration/lib/src/io.dart b/tools/migration/lib/src/io.dart
index 83cb1bc5efb10139aab8e49deb9f60fcf530967e..0e97c46f0cbcecb1c4a4b9833d20d8f006131196 100644
--- a/tools/migration/lib/src/io.dart
+++ b/tools/migration/lib/src/io.dart
@@ -48,11 +48,14 @@ void deleteFile(String path) {
/// assumed to be relative to the SDK's "tests" directory and having file
/// [extension].
Iterable<String> listFiles(String dir, {String extension = ".dart"}) {
- return new Directory(p.join(testRoot, dir))
- .listSync(recursive: true)
- .map((entry) {
- if (!entry.path.endsWith(extension)) return null;
-
- return entry.path;
- }).where((path) => path != null);
+ try {
+ return new Directory(p.join(testRoot, dir))
+ .listSync(recursive: true)
+ .map((entry) {
+ if (!entry.path.endsWith(extension)) return null;
+ return entry.path;
+ }).where((path) => path != null);
+ } catch (FileSystemException) {
+ return [];
+ }
}

Powered by Google App Engine
This is Rietveld 408576698