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

Unified Diff: utils/pub/system_cache.dart

Issue 12225085: Make createTempDir() synchronous. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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 | « utils/pub/io.dart ('k') | utils/tests/pub/test_pub.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/pub/system_cache.dart
diff --git a/utils/pub/system_cache.dart b/utils/pub/system_cache.dart
index 1b5d9820b79ad20a7d43c410d63277511e833ca7..13e6b8d68db8d6ca2119339b00abd2c61cb32fc1 100644
--- a/utils/pub/system_cache.dart
+++ b/utils/pub/system_cache.dart
@@ -101,11 +101,9 @@ class SystemCache {
/// packages into while installing. It uses this instead of the OS's system
/// temp directory to ensure that it's on the same volume as the pub system
/// cache so that it can move the directory from it.
- Future<Directory> createTempDir() {
- return defer(() {
- var temp = ensureDir(tempDir);
- return io.createTempDir(join(temp, 'dir'));
- });
+ Directory createTempDir() {
+ var temp = ensureDir(tempDir);
+ return io.createTempDir(join(temp, 'dir'));
}
/// Delete's the system cache's internal temp directory.
« no previous file with comments | « utils/pub/io.dart ('k') | utils/tests/pub/test_pub.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698