| Index: sdk/lib/io/file_impl.dart
|
| diff --git a/sdk/lib/io/file_impl.dart b/sdk/lib/io/file_impl.dart
|
| index 6b0dc96789ae8626baf5c27948ad74ed8834ea7d..5dd559c1835ee022d6afac71a9409a7a1ed414d3 100644
|
| --- a/sdk/lib/io/file_impl.dart
|
| +++ b/sdk/lib/io/file_impl.dart
|
| @@ -446,8 +446,8 @@ class _File extends FileSystemEntity implements File {
|
| var completer = new Completer();
|
| void read() {
|
| file.read(_BLOCK_SIZE).then((data) {
|
| - if (data.length > 0) builder.add(data);
|
| - if (data.length == _BLOCK_SIZE) {
|
| + if (data.length > 0) {
|
| + builder.add(data);
|
| read();
|
| } else {
|
| completer.complete(builder.takeBytes());
|
| @@ -480,7 +480,7 @@ class _File extends FileSystemEntity implements File {
|
| do {
|
| data = opened.readSync(_BLOCK_SIZE);
|
| if (data.length > 0) builder.add(data);
|
| - } while (data.length == _BLOCK_SIZE);
|
| + } while (data.length > 0);
|
| data = builder.takeBytes();
|
| } else {
|
| data = opened.readSync(length);
|
|
|