return false if remove failed

if OCFile is null --> cannot delete ==> return false.
This commit is contained in:
LukeOwncloud 2015-06-23 13:49:58 +02:00 committed by AndyScherzinger
parent e8f5c57329
commit a82ab8e50f
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B

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);
@ -491,7 +491,7 @@ public class FileDataStorageManager {
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);