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

Unified Diff: samples/leap/leap_server.dart

Issue 10392023: Change dart:io to use Future for one-shot operations. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Adding stable test binaries Created 8 years, 7 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 | « runtime/bin/process_impl.dart ('k') | samples/total/server/TotalRunner.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/leap/leap_server.dart
diff --git a/samples/leap/leap_server.dart b/samples/leap/leap_server.dart
index 1812491aa64388bdad121b1cef78eee3875d2586..c2c419308a0a501c772e54fe190d4ff5a886768b 100644
--- a/samples/leap/leap_server.dart
+++ b/samples/leap/leap_server.dart
@@ -43,7 +43,7 @@ class Conversation {
}
if (path.contains('..') || path.contains('%')) return notFound();
var f = new File("./$path");
- f.exists((bool exists) {
+ f.exists().then((bool exists) {
if (!exists) return notFound();
if (path.endsWith('.dart')) {
response.headers.add(HttpHeaders.CONTENT_TYPE, "application/dart");
« no previous file with comments | « runtime/bin/process_impl.dart ('k') | samples/total/server/TotalRunner.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698