fix: setup progress bar indicates wrong progress

This commit is contained in:
imkiva 2018-09-10 22:38:57 +08:00
parent 04a5485319
commit fc2b3f33a6
No known key found for this signature in database
GPG Key ID: A0A40A816B1689AA

View File

@ -50,16 +50,16 @@ final class SetupThread extends Thread {
deleteFolder(stagingPrefixFile);
}
int totalBytes = 0;
int totalReadBytes = 0;
final byte[] buffer = new byte[8096];
final List<Pair<String, String>> symlinks = new ArrayList<>(50);
totalBytes = sourceConnection.getSize();
try (ZipInputStream zipInput = new ZipInputStream(sourceConnection.getInputStream())) {
ZipEntry zipEntry;
int totalBytes = sourceConnection.getSize();
while ((zipEntry = zipInput.getNextEntry()) != null) {
totalReadBytes += zipEntry.getCompressedSize();