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

Unified Diff: utils/pub/io.dart

Issue 11881032: Stop working around issue 7781 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 | « utils/pub/http.dart ('k') | 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 665680e828ebc871f4c4cec1e81cc2a4fd8680ac..18475eafb220fa8925d07987c34ab8a89a9b6f74 100644
--- a/utils/pub/io.dart
+++ b/utils/pub/io.dart
@@ -189,10 +189,10 @@ Future<Directory> ensureDir(path) {
return ensureDir(dirname(path)).then((_) {
return createDir(path).catchError((asyncError) {
- var error = getRealError(asyncError);
- if (error is! DirectoryIOException) throw asyncError;
+ if (asyncError.error is! DirectoryIOException) throw asyncError;
// Error 17 means the directory already exists (or 183 on Windows).
- if (error.osError.errorCode == 17 || error.osError.errorCode == 183) {
+ if (asyncError.error.osError.errorCode == 17 ||
+ asyncError.error.osError.errorCode == 183) {
log.fine("Got 'already exists' error when creating directory.");
return _getDirectory(path);
}
« no previous file with comments | « utils/pub/http.dart ('k') | utils/pub/oauth2.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698