progress #7

Closed
asgardius wants to merge 1 commit from refs/pull/7/head into main
3 changed files with 16 additions and 9 deletions

View file

@ -25,7 +25,7 @@ Current feature list
Planned feature list
* better interface for uploads and downloads
* Nothing for now
This app is a work in progress, so it have some bugs that need to be fixed

View file

@ -3,14 +3,14 @@ plugins {
}
android {
compileSdk 32
compileSdk 33
defaultConfig {
applicationId "asgardius.page.s3manager"
minSdk 24
targetSdk 33
versionCode 15
versionName "0.1.13"
versionCode 17
versionName "0.1.15"
setProperty("archivesBaseName", "s3-manager-$versionName")
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

View file

@ -91,14 +91,21 @@ public class ObjectInfo extends AppCompatActivity {
orequest = new ListObjectsRequest().withBucketName(bucket).withPrefix(object).withMaxKeys(8000);
}
ObjectListing result = s3client.listObjects(orequest);
do {
for (S3ObjectSummary objectSummary : result.getObjectSummaries()) {
totalSize += objectSummary.getSize();
List<S3ObjectSummary> objects = result.getObjectSummaries();
boolean nextbatch = false;
while (result.isTruncated() || !nextbatch) {
if (nextbatch) {
result = s3client.listNextBatchOfObjects (result);
objects = result.getObjectSummaries();
} else {
nextbatch = true;
}
for (S3ObjectSummary os : objects) {
totalSize += os.getSize();
totalItems++;
}
result = s3client.listNextBatchOfObjects (result);
} while (result.isTruncated());
}
runOnUiThread(new Runnable() {