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

Unified Diff: pkg/dev_compiler/lib/src/compiler/command.dart

Issue 2483753004: fix #27771, create directory if needed (Closed)
Patch Set: Created 4 years, 1 month 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
Index: pkg/dev_compiler/lib/src/compiler/command.dart
diff --git a/pkg/dev_compiler/lib/src/compiler/command.dart b/pkg/dev_compiler/lib/src/compiler/command.dart
index 87b2a57e70a76cd8a409c715ca393a0e97aa5666..7d5e2121b9d3932d31e10c3dbd67c02352e2e61f 100644
--- a/pkg/dev_compiler/lib/src/compiler/command.dart
+++ b/pkg/dev_compiler/lib/src/compiler/command.dart
@@ -170,6 +170,7 @@ void _compile(ArgResults argResults, void printFn(Object obj)) {
var file = new File(summaryPath);
if (!file.existsSync() ||
_changed(file.readAsBytesSync(), module.summaryBytes)) {
+ if (!file.parent.existsSync()) file.parent.createSync(recursive: true);
file.writeAsBytesSync(module.summaryBytes);
}
}
« no previous file with comments | « no previous file | pkg/dev_compiler/lib/src/compiler/compiler.dart » ('j') | pkg/dev_compiler/test/worker/worker_test.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698