Skip to content

Commit

Permalink
fix: condition clearer
Browse files Browse the repository at this point in the history
  • Loading branch information
Aitorbp committed Jun 12, 2024
1 parent 92a3724 commit 62a76c5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ class OCFileRepository(

// 1. Remove folder content recursively
folderContent.forEach { file ->
if (!onlyFromLocalStorage || !file.isAvailableOffline) {
if (!(onlyFromLocalStorage && file.isAvailableOffline)) { // The condition will not be met when onlyFromLocalStorage is true and the file is of type available offline
if (file.isFolder) {
deleteLocalFolderRecursively(ocFile = file, onlyFromLocalStorage = onlyFromLocalStorage)
} else {
Expand Down

0 comments on commit 62a76c5

Please sign in to comment.