diff --git a/app/src/main/java/foundation/e/drive/contentScanner/RemoteContentScanner.java b/app/src/main/java/foundation/e/drive/contentScanner/RemoteContentScanner.java index 9ff7c18c5c58bacadae5b383a9e5c02a487c4b74..0e8d37ed2e4a208bee9ea625725a45abfe403c0e 100644 --- a/app/src/main/java/foundation/e/drive/contentScanner/RemoteContentScanner.java +++ b/app/src/main/java/foundation/e/drive/contentScanner/RemoteContentScanner.java @@ -82,12 +82,16 @@ public class RemoteContentScanner extends AbstractContentScanner { @Override protected void onMissingFile(SyncedFileState fileState) { + //TODO: disabled file deletion feature for now to handle accidental file deletion. + //Uncomment the following block when we resolve the issue: https://gitlab.e.foundation/e/backlog/-/issues/6711 +/* if (!fileState.hasBeenSynchronizedOnce()) { return; } Timber.d("Add local deletion request for file: %s", fileState.getLocalPath()); this.syncRequests.put(fileState.getId(), new SyncRequest(fileState, LOCAL_DELETE)); +*/ } @Override diff --git a/app/src/main/java/foundation/e/drive/services/SynchronizationService.java b/app/src/main/java/foundation/e/drive/services/SynchronizationService.java index 2ff8733bb19134a2e66a50c02041ffa38d9335bc..749461675a35d4217446029b29b7f22d5ec0efd9 100644 --- a/app/src/main/java/foundation/e/drive/services/SynchronizationService.java +++ b/app/src/main/java/foundation/e/drive/services/SynchronizationService.java @@ -236,12 +236,16 @@ public class SynchronizationService extends Service implements OnRemoteOperation final SyncWrapper syncWrapper = new SyncWrapper(request, account, getApplicationContext()); if (request.getOperationType().equals(SyncRequest.Type.LOCAL_DELETE)) { + //TODO: disabled file deletion feature for now to handle accidental file deletion. + //Uncomment the following block when we resolve the issue: https://gitlab.e.foundation/e/backlog/-/issues/6711 +/* Timber.v(" starts " + request.getSyncedFileState().getName() + " local deletion on thread " + threadIndex); final LocalFileDeleter fileDeleter = new LocalFileDeleter(request.getSyncedFileState()); threadPool[threadIndex] = new Thread(fileDeleter.getRunnable( handler, threadIndex, getApplicationContext(), this)); threadPool[threadIndex].start(); startedSync.put(threadIndex, syncWrapper); +*/ return; }