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

Unified Diff: sdk/lib/_internal/pub/lib/src/io.dart

Issue 745153002: Make pub's binstubs resilient to changes in snapshot format. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review changes Created 6 years 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 | « sdk/lib/_internal/pub/lib/src/global_packages.dart ('k') | sdk/lib/_internal/pub/lib/src/log.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/pub/lib/src/io.dart
diff --git a/sdk/lib/_internal/pub/lib/src/io.dart b/sdk/lib/_internal/pub/lib/src/io.dart
index c55c17b67e345308edbe6b4e2e02fed1787267e2..58a52ef00eaf0e412fb618ec23763f836da0273f 100644
--- a/sdk/lib/_internal/pub/lib/src/io.dart
+++ b/sdk/lib/_internal/pub/lib/src/io.dart
@@ -392,6 +392,17 @@ void deleteEntry(String path) {
});
}
+/// Attempts to delete whatever's at [path], but doesn't throw an exception if
+/// the deletion fails.
+void tryDeleteEntry(String path) {
+ try {
+ deleteEntry(path);
+ } catch (error, stackTrace) {
+ log.fine("Failed to delete $entry: $error\n"
+ "${new Chain.forTrace(stackTrace)}");
+ }
+}
+
/// "Cleans" [dir].
///
/// If that directory already exists, it is deleted. Then a new empty directory
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/global_packages.dart ('k') | sdk/lib/_internal/pub/lib/src/log.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698