Index: sdk/lib/io/directory_impl.dart |
diff --git a/sdk/lib/io/directory_impl.dart b/sdk/lib/io/directory_impl.dart |
index 288364868df2b194827bd594a157b9ecb1755f04..c8402676638cb40984bf9428ec0f359480025061 100644 |
--- a/sdk/lib/io/directory_impl.dart |
+++ b/sdk/lib/io/directory_impl.dart |
@@ -155,9 +155,9 @@ class _Directory extends FileSystemEntity implements Directory { |
Future<Directory> createTemp([String prefix]) { |
if (prefix == null) prefix = ''; |
if (path == '') { |
- return systemTemp.createTemp(prefix); |
- // TODO(13720): On Oct 18, 2013, replace this with |
- // an error. createTemp cannot be called on a Directory with empty path. |
+ throw new ArgumentError( |
+ "Directory.createTemp called with an empty path. " |
+ "To use the system temp directory, use Directory.systemTemp"); |
} |
String fullPrefix; |
if (path.endsWith('/') || (Platform.isWindows && path.endsWith('\\'))) { |
@@ -178,9 +178,9 @@ class _Directory extends FileSystemEntity implements Directory { |
Directory createTempSync([String prefix]) { |
if (prefix == null) prefix = ''; |
if (path == '') { |
- return systemTemp.createTempSync(prefix); |
- // TODO(13720): On Oct 18, 2013, replace this with |
- // an error. createTemp cannot be called on a Directory with empty path. |
+ throw new ArgumentError( |
+ "Directory.createTemp called with an empty path. " |
+ "To use the system temp directory, use Directory.systemTemp"); |
} |
String fullPrefix; |
if (path.endsWith('/') || (Platform.isWindows && path.endsWith('\\'))) { |