Browse Source

fix removing of local only folder

tobiasKaminsky 7 years ago
parent
commit
3a9eba43e9

+ 3 - 1
src/main/java/com/owncloud/android/datamodel/FileDataStorageManager.java

@@ -519,7 +519,7 @@ public class FileDataStorageManager {
 
 
     public boolean removeFolder(OCFile folder, boolean removeDBData, boolean removeLocalContent) {
-        boolean success = false;
+        boolean success = true;
         if (folder != null && folder.isFolder()) {
             if (removeDBData && folder.getFileId() != -1) {
                 success = removeFolderInDb(folder);
@@ -527,6 +527,8 @@ public class FileDataStorageManager {
             if (removeLocalContent && success) {
                 success = removeLocalFolder(folder);
             }
+        } else {
+            success = false;
         }
 
         return success;