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

Unified Diff: utils/pub/io.dart

Issue 11778108: Stop working around issue 7790 in pub. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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
« no previous file with comments | « no previous file | utils/pub/oauth2.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/pub/io.dart
diff --git a/utils/pub/io.dart b/utils/pub/io.dart
index 0309b90d9af0cc55fd32cb1a2c42f721b7135e30..0611b35df47addd89380fb0b3395fc675598352c 100644
--- a/utils/pub/io.dart
+++ b/utils/pub/io.dart
@@ -749,10 +749,10 @@ Future timeout(Future input, int milliseconds, String description) {
/// will be deleted.
Future withTempDir(Future fn(String path)) {
var tempDir;
- return asyncWhenComplete(createTempDir().then((dir) {
+ return createTempDir().then((dir) {
tempDir = dir;
return fn(tempDir.path);
- }), () {
+ }).whenComplete(() {
log.fine('Cleaning up temp directory ${tempDir.path}.');
return deleteDir(tempDir);
});
« no previous file with comments | « no previous file | utils/pub/oauth2.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698