Mercurial > 510Connectbot
diff src/ch/ethz/ssh2/SFTPInputStream.java @ 308:42b15aaa7ac7 ganymed
merge
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Wed, 30 Jul 2014 14:21:50 -0700 |
parents | 071eccdff8ea |
children |
line wrap: on
line diff
--- a/src/ch/ethz/ssh2/SFTPInputStream.java Wed Jul 30 13:38:04 2014 -0700 +++ b/src/ch/ethz/ssh2/SFTPInputStream.java Wed Jul 30 14:21:50 2014 -0700 @@ -34,9 +34,11 @@ @Override public int read(byte[] buffer, int offset, int len) throws IOException { int read = handle.getClient().read(handle, readOffset, buffer, offset, len); - if(read > 0) { + + if (read > 0) { readOffset += read; } + return read; } @@ -58,9 +60,11 @@ public int read() throws IOException { byte[] buffer = new byte[1]; int b = handle.getClient().read(handle, readOffset, buffer, 0, 1); - if(b > 0) { + + if (b > 0) { readOffset += 1; } + return b; }