Index: runtime/bin/vmservice/vmservice_io.dart |
diff --git a/runtime/bin/vmservice/vmservice_io.dart b/runtime/bin/vmservice/vmservice_io.dart |
index 7fc6e8b182d330349c797fa50d54f94498fa15ed..ed1d4732dc69770cace5b73738d5b822e6f9e694 100644 |
--- a/runtime/bin/vmservice/vmservice_io.dart |
+++ b/runtime/bin/vmservice/vmservice_io.dart |
@@ -72,12 +72,14 @@ Future deleteDirCallback(Uri path) async { |
} |
Future writeFileCallback(Uri path, List<int> bytes) async { |
- var file = await new File.fromUri(path); |
+ var file = new File.fromUri(path); |
+ var parent_directory = file.parent; |
+ await parent_directory.create(recursive: true); |
await file.writeAsBytes(bytes); |
} |
Future<List<int>> readFileCallback(Uri path) async { |
- var file = await new File.fromUri(path); |
+ var file = new File.fromUri(path); |
return await file.readAsBytes(); |
} |