cryptomator / android

Cryptomator for Android
https://cryptomator.org
GNU General Public License v3.0
754 stars 124 forks source link

Deleting a folder that doesn't have a lvl2Dir linked to the dir.c9r file should be sucessfull #446

Open SailReal opened 2 years ago

SailReal commented 2 years ago

Please agree to the following

Summary

Currently deleting a folder for which the linked lvl2Dir doesn't exists fails with an general error toast but should be successful

System Setup

- Android: x
- Cryptomator: 1.7.5

Cloud Type

No response

Steps to Reproduce

  1. Delete the lvl2Dir of a folder
  2. Try to delete the folder

Expected Behavior

Folder gets deleted

Actual Behavior

General error toast is displayed

Reproducibility

Always

Relevant Log Output

org.cryptomator.debug E/ExceptionHandler:       java.lang.IllegalArgumentException: Failed to determine if primary:Vaults/asdf/d/EA/VXYO2XV6JL5FP76JHX7GNPGH3AYCO2 is child of primary:Vaults: java.io.FileNotFoundException: Missing file for primary:Vaults/asdf/d/EA/VXYO2XV6JL5FP76JHX7GNPGH3AYCO2 at /storage/emulated/0/Vaults/asdf/d/EA/VXYO2XV6JL5FP76JHX7GNPGH3AYCO2
        at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:172)
        at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:142)
        at android.content.ContentProviderProxy.query(ContentProviderNative.java:481)
        at android.content.ContentResolver.query(ContentResolver.java:1219)
        at android.content.ContentResolver.query(ContentResolver.java:1151)
        at android.content.ContentResolver.query(ContentResolver.java:1107)
        at org.cryptomator.data.cloud.local.LocalStorageAccessFrameworkImpl.list(LocalStorageAccessFrameworkImpl.kt:170)
        at org.cryptomator.data.cloud.local.LocalStorageAccessFrameworkContentRepository.list(LocalStorageAccessFrameworkContentRepository.kt:54)
        at org.cryptomator.data.cloud.local.LocalStorageAccessFrameworkContentRepository.list(LocalStorageAccessFrameworkContentRepository.kt:18)
        at org.cryptomator.data.repository.DispatchingCloudContentRepository.list(DispatchingCloudContentRepository.kt:103)
        at org.cryptomator.data.cloud.crypto.CryptoImplVaultFormat7.list(CryptoImplVaultFormat7.kt:151)
        at org.cryptomator.data.cloud.crypto.CryptoCloudContentRepository.list(CryptoCloudContentRepository.kt:58)
        at org.cryptomator.data.cloud.crypto.CryptoCloudContentRepository.list(CryptoCloudContentRepository.kt:21)
        at org.cryptomator.data.repository.DispatchingCloudContentRepository.list(DispatchingCloudContentRepository.kt:103)
        at org.cryptomator.domain.usecases.cloud.GetCloudList.execute(GetCloudList.java:24)
        at org.cryptomator.domain.usecases.cloud.GetCloudListUseCase$Launcher$2.call(GetCloudListUseCase.java:92)
        at org.cryptomator.domain.usecases.cloud.GetCloudListUseCase$Launcher$2.call(GetCloudListUseCase.java:86)
        at io.reactivex.internal.operators.flowable.FlowableFromCallable.subscribeActual(FlowableFromCallable.java:39)
        at io.reactivex.Flowable.subscribe(Flowable.java:14935)
        at io.reactivex.Flowable.subscribe(Flowable.java:14882)
        at io.reactivex.internal.operators.flowable.FlowableSubscribeOn$SubscribeOnSubscriber.run(FlowableSubscribeOn.java:82)
        at io.reactivex.internal.schedulers.ExecutorScheduler$ExecutorWorker$BooleanRunnable.run(ExecutorScheduler.java:288)
        at io.reactivex.internal.schedulers.ExecutorScheduler$ExecutorWorker.run(ExecutorScheduler.java:253)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:920)

            ErrorCode: JI27:FBHQ

or

org.cryptomator.debug V/DeleteNodes:            Skipped deletion of /asdfasdf: Not found
    org.cryptomator.domain.exception.NoSuchCloudFileException: WPCSQHQTVYQ23IBPB4ZY2P7OFCJ4DK
        at org.cryptomator.data.cloud.webdav.WebDavCloudContentRepository$Intercepted.delete(WebDavCloudContentRepository.kt:227)
        at org.cryptomator.data.cloud.webdav.WebDavCloudContentRepository$Intercepted.delete(WebDavCloudContentRepository.kt:95)
        at org.cryptomator.data.cloud.InterceptingCloudContentRepository.delete(InterceptingCloudContentRepository.kt:181)
        at org.cryptomator.data.repository.DispatchingCloudContentRepository.delete(DispatchingCloudContentRepository.kt:171)
        at org.cryptomator.data.cloud.crypto.CryptoImplVaultFormat7.delete(CryptoImplVaultFormat7.kt:424)
        at org.cryptomator.data.cloud.crypto.CryptoCloudContentRepository.delete(CryptoCloudContentRepository.kt:100)
        at org.cryptomator.data.cloud.crypto.CryptoCloudContentRepository.delete(CryptoCloudContentRepository.kt:21)
        at org.cryptomator.data.repository.DispatchingCloudContentRepository.delete(DispatchingCloudContentRepository.kt:171)
        at org.cryptomator.domain.usecases.cloud.DeleteNodes.execute(DeleteNodes.java:29)
        at org.cryptomator.domain.usecases.cloud.DeleteNodesUseCase$Launcher$2.call(DeleteNodesUseCase.java:92)
        at org.cryptomator.domain.usecases.cloud.DeleteNodesUseCase$Launcher$2.call(DeleteNodesUseCase.java:86)
        at io.reactivex.internal.operators.flowable.FlowableFromCallable.subscribeActual(FlowableFromCallable.java:39)
        at io.reactivex.Flowable.subscribe(Flowable.java:14935)
        at io.reactivex.Flowable.subscribe(Flowable.java:14882)
        at io.reactivex.internal.operators.flowable.FlowableSubscribeOn$SubscribeOnSubscriber.run(FlowableSubscribeOn.java:82)
        at io.reactivex.internal.schedulers.ExecutorScheduler$ExecutorWorker$BooleanRunnable.run(ExecutorScheduler.java:288)
        at io.reactivex.internal.schedulers.ExecutorScheduler$ExecutorWorker.run(ExecutorScheduler.java:253)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:920)

                ErrorCode: BG06:7MK9

Anything else?

Must be checked for each cloud

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.