Skip to content

Commit

Permalink
S3 uploader cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
lrmtheboss committed Apr 10, 2024
1 parent dd9ee7d commit 14c65a2
Showing 1 changed file with 2 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,12 @@
import static ratismal.drivebackup.config.Localization.intl;

public class S3Uploader extends Uploader {
private UploadLogger logger;

public static final String UPLOADER_NAME = "S3";
public static final String UPLOADER_ID = "s3";

private MinioClient minioClient;

private boolean _errorOccurred;

private String _bucket;
private String _hostname;

Expand Down Expand Up @@ -68,11 +66,6 @@ public boolean isAuthenticated() {
return true;
}

@Override
public boolean isErrorWhileUploading() {
return _errorOccurred;
}

@Override
public void test(File testFile) {
try {
Expand Down Expand Up @@ -109,10 +102,6 @@ public void uploadFile(File file, String type) {
public void close() {
}

public void setErrorOccurred(boolean errorOccurred) {
_errorOccurred = errorOccurred;
}

public void pruneBackups(String type) throws Exception {
int fileLimit = ConfigParser.getConfig().backupStorage.keepCount;
if (fileLimit == -1) {
Expand Down Expand Up @@ -146,7 +135,7 @@ private TreeMap<ZonedDateTime, Item> getZipFiles(String type) throws Exception {
}

@NotNull
private String normalizeType(@NotNull String type) {
private static String normalizeType(@NotNull String type) {
if(type.startsWith("./")) {
return type.substring(2);
}
Expand Down

0 comments on commit 14c65a2

Please sign in to comment.