diff options
author | Stefan Niedermann <info@niedermann.it> | 2020-06-22 15:55:34 +0300 |
---|---|---|
committer | Stefan Niedermann <info@niedermann.it> | 2020-06-22 15:55:34 +0300 |
commit | e614af1efbdbaef0b5058b86ae7252f5405c8967 (patch) | |
tree | ee1e06650ee95494345c3750b6c4ee2178fd8f9b /app/src/main/java/it/niedermann/nextcloud | |
parent | 4d30ff5f5ae493de57f86ccfbda3293f206e5e48 (diff) |
Fix #547 Delete attachments on failed uploads
Diffstat (limited to 'app/src/main/java/it/niedermann/nextcloud')
-rw-r--r-- | app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/helpers/providers/AttachmentDataProvider.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/helpers/providers/AttachmentDataProvider.java b/app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/helpers/providers/AttachmentDataProvider.java index 452e2d98f..37e00dada 100644 --- a/app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/helpers/providers/AttachmentDataProvider.java +++ b/app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/helpers/providers/AttachmentDataProvider.java @@ -9,7 +9,6 @@ import java.util.List; import it.niedermann.nextcloud.deck.DeckLog; import it.niedermann.nextcloud.deck.api.IResponseCallback; -import it.niedermann.nextcloud.deck.exceptions.HandledServerErrors; import it.niedermann.nextcloud.deck.model.Attachment; import it.niedermann.nextcloud.deck.model.Board; import it.niedermann.nextcloud.deck.model.Stack; @@ -83,9 +82,9 @@ public class AttachmentDataProvider extends AbstractSyncDataProvider<Attachment> if (!file.delete()) { DeckLog.error("Could not delete local file: " + file.getAbsolutePath()); } - if (HandledServerErrors.ATTACHMENTS_FILE_ALREADY_EXISTS == HandledServerErrors.fromThrowable(throwable)) { - dataBaseAdapter.deleteAttachment(accountId, entity, false); - } + // if (HandledServerErrors.ATTACHMENTS_FILE_ALREADY_EXISTS == HandledServerErrors.fromThrowable(throwable)) { + dataBaseAdapter.deleteAttachment(accountId, entity, false); + // } responder.onError(throwable); } }); |