mirror of
https://github.com/nextcloud/android.git
synced 2024-11-22 21:25:35 +03:00
return false if remove failed
if OCFile is null --> cannot delete ==> return false.
This commit is contained in:
parent
e8f5c57329
commit
a82ab8e50f
1 changed files with 2 additions and 2 deletions
|
@ -443,7 +443,7 @@ public class FileDataStorageManager {
|
||||||
|
|
||||||
|
|
||||||
public boolean removeFile(OCFile file, boolean removeDBData, boolean removeLocalCopy) {
|
public boolean removeFile(OCFile file, boolean removeDBData, boolean removeLocalCopy) {
|
||||||
boolean success = true;
|
boolean success = false;
|
||||||
if (file != null) {
|
if (file != null) {
|
||||||
if (file.isFolder()) {
|
if (file.isFolder()) {
|
||||||
success = removeFolder(file, removeDBData, removeLocalCopy);
|
success = removeFolder(file, removeDBData, removeLocalCopy);
|
||||||
|
@ -491,7 +491,7 @@ public class FileDataStorageManager {
|
||||||
|
|
||||||
|
|
||||||
public boolean removeFolder(OCFile folder, boolean removeDBData, boolean removeLocalContent) {
|
public boolean removeFolder(OCFile folder, boolean removeDBData, boolean removeLocalContent) {
|
||||||
boolean success = true;
|
boolean success = false;
|
||||||
if (folder != null && folder.isFolder()) {
|
if (folder != null && folder.isFolder()) {
|
||||||
if (removeDBData && folder.getFileId() != -1) {
|
if (removeDBData && folder.getFileId() != -1) {
|
||||||
success = removeFolderInDb(folder);
|
success = removeFolderInDb(folder);
|
||||||
|
|
Loading…
Reference in a new issue