continue->next in Ruby script (#104296)
This commit is contained in:
@@ -18,19 +18,19 @@ import 'package:test_api/test_api.dart' hide test; // ignore: deprecated_member_
|
||||
|
||||
export 'package:test_api/test_api.dart' hide test, isInstanceOf; // ignore: deprecated_member_use
|
||||
|
||||
void tryToDelete(Directory directory) {
|
||||
void tryToDelete(FileSystemEntity fileEntity) {
|
||||
// This should not be necessary, but it turns out that
|
||||
// on Windows it's common for deletions to fail due to
|
||||
// bogus (we think) "access denied" errors.
|
||||
try {
|
||||
if (directory.existsSync()) {
|
||||
directory.deleteSync(recursive: true);
|
||||
if (fileEntity.existsSync()) {
|
||||
fileEntity.deleteSync(recursive: true);
|
||||
}
|
||||
} on FileSystemException catch (error) {
|
||||
// We print this so that it's visible in the logs, to get an idea of how
|
||||
// common this problem is, and if any patterns are ever noticed by anyone.
|
||||
// ignore: avoid_print
|
||||
print('Failed to delete ${directory.path}: $error');
|
||||
print('Failed to delete ${fileEntity.path}: $error');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user