Skip to content

Commit

Permalink
Merge pull request #13514 from nextcloud/bugfix/npe-e2e-conflict-resolve
Browse files Browse the repository at this point in the history
BugFix - E2E Solve File Conflict NPE
  • Loading branch information
ZetaTom authored Sep 18, 2024
2 parents fae6d15 + 6654001 commit 74fe8cf
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import com.owncloud.android.lib.common.operations.RemoteOperation;
import com.owncloud.android.lib.common.operations.RemoteOperationResult;
import com.owncloud.android.lib.common.operations.RemoteOperationResult.ResultCode;
import com.owncloud.android.lib.common.utils.Log_OC;
import com.owncloud.android.lib.resources.files.RemoveFileRemoteOperation;
import com.owncloud.android.operations.common.SyncOperation;
import com.owncloud.android.utils.MimeTypeUtil;
Expand Down Expand Up @@ -86,7 +87,11 @@ protected RemoteOperationResult run(OwnCloudClient client) {
boolean localRemovalFailed = false;
if (!onlyLocalCopy) {
if (fileToRemove.isEncrypted()) {
OCFile parent = getStorageManager().getFileByPath(fileToRemove.getParentRemotePath());
OCFile parent = getStorageManager().getFileById(fileToRemove.getParentId());
if (parent == null) {
return new RemoteOperationResult(ResultCode.LOCAL_FILE_NOT_FOUND);
}

operation = new RemoveRemoteEncryptedFileOperation(fileToRemove.getRemotePath(),
user,
context,
Expand Down

0 comments on commit 74fe8cf

Please sign in to comment.