Merge pull request #241 from nextcloud/LukeOwncloud-patch-remove-failed

fix remove failed
This commit is contained in:
Tobias Kaminsky 2016-10-05 20:28:37 +02:00 committed by GitHub
commit bb64481c65

View file

@ -443,7 +443,7 @@ public class FileDataStorageManager {
public boolean removeFile(OCFile file, boolean removeDBData, boolean removeLocalCopy) {
boolean success = true;
boolean success = false;
if (file != null) {
if (file.isFolder()) {
success = removeFolder(file, removeDBData, removeLocalCopy);
@ -483,15 +483,14 @@ public class FileDataStorageManager {
}
}
}
} else {
success = false;
}
return success;
}
public boolean removeFolder(OCFile folder, boolean removeDBData, boolean removeLocalContent) {
boolean success = true;
boolean success = false;
if (folder != null && folder.isFolder()) {
if (removeDBData && folder.getFileId() != -1) {
success = removeFolderInDb(folder);
@ -500,6 +499,7 @@ public class FileDataStorageManager {
success = removeLocalFolder(folder);
}
}
return success;
}