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

Unified Diff: runtime/bin/vmservice/vmservice_io.dart

Issue 2157013002: Fix DevFS writes with subdirectories (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 5 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 | « no previous file | runtime/observatory/tests/service/dev_fs_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
« no previous file with comments | « no previous file | runtime/observatory/tests/service/dev_fs_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698