cryptomator / cryptomator/android

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

Open
#446 1 comment 0 reactions 0 assignees View on GitHub
type:bug
Dominant language
Kotlin
Stars
1.2k
Forks
216
PR merge metrics
No merged PRs in 30d

Description

### Please agree to the following

- [X] I have searched [existing issues](https://github.com/cryptomator/android/issues?q=) for duplicates
- [X] I agree to follow this project's [Code of Conduct](https://github.com/cryptomator/android/blob/develop/.github/CODE_OF_CONDUCT.md)

### 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

```markdown
- 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

```shell
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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.