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

Unified Diff: pkg/polymer/lib/deploy.dart

Issue 23599003: Fix read/write of binary assets in deploy (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/polymer/lib/deploy.dart
diff --git a/pkg/polymer/lib/deploy.dart b/pkg/polymer/lib/deploy.dart
index 5706463a4a76c909407b9e3f8cfd7500c543fb7f..86f157ba1ee3dd7cf3e8408fee8279ca9887b854 100644
--- a/pkg/polymer/lib/deploy.dart
+++ b/pkg/polymer/lib/deploy.dart
@@ -118,8 +118,8 @@ Future _emitAllFiles(Barback barback, String outDir) {
}
_ensureDir(path.dirname(filepath));
- futures.add(asset.readAsString()
- .then((content) => new File(filepath).writeAsStringSync(content)));
Siggi Cherem (dart-lang) 2013/08/27 16:54:28 turns out I was reading a .png file this way, yike
+ var writer = new File(filepath).openWrite();
+ futures.add(writer.addStream(asset.read()).then((_) => writer.close()));
}
return Future.wait(futures);
}).then((_) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698