Fix bug in getZipEntryContent() where entries aren't fully read if not immediately available.
This commit is contained in:
parent
d66c3965d4
commit
46fc141e97
1 changed files with 7 additions and 1 deletions
|
@ -214,7 +214,13 @@ public class ZippedAppFile implements Updatable {
|
||||||
char[] c = new char[size];
|
char[] c = new char[size];
|
||||||
InputStreamReader reader = new InputStreamReader(zip.getInputStream(entry));
|
InputStreamReader reader = new InputStreamReader(zip.getInputStream(entry));
|
||||||
|
|
||||||
reader.read(c);
|
int read = 0;
|
||||||
|
while (read < size) {
|
||||||
|
int r = reader.read(c, read, size-read);
|
||||||
|
if (r == -1)
|
||||||
|
break;
|
||||||
|
read += r;
|
||||||
|
}
|
||||||
|
|
||||||
return new String(c);
|
return new String(c);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue