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); |
} |