Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 69b5d759 authored by Fahim Salam Chowdhury's avatar Fahim Salam Chowdhury 👽
Browse files

6711-Disable_local_file_deletion_feature

parent 5f27a37d
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -82,12 +82,16 @@ public class RemoteContentScanner extends AbstractContentScanner<RemoteFile> {

    @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
+4 −0
Original line number Diff line number Diff line
@@ -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;
        }