if (removeLocalCopy && file.isDown() && localPath != null && success) {
success = new File(localPath).delete();
if (success) {
if (removeLocalCopy && file.isDown() && localPath != null && success) {
success = new File(localPath).delete();
if (success) {
}
if (!removeDBData && success) {
// maybe unnecessary, but should be checked TODO remove if unnecessary
}
if (!removeDBData && success) {
// maybe unnecessary, but should be checked TODO remove if unnecessary
- File localFolder = new File(FileStorageUtils.getDefaultSavePathFor(mAccount.name, folder));
+ String localFolderPath = FileStorageUtils.getDefaultSavePathFor(mAccount.name, folder);
+ File localFolder = new File(localFolderPath);
if (localFolder.exists()) {
// stage 1: remove the local files already registered in the files database
Vector<OCFile> files = getFolderContent(folder.getFileId());
if (localFolder.exists()) {
// stage 1: remove the local files already registered in the files database
Vector<OCFile> files = getFolderContent(folder.getFileId());
File localFile = new File(file.getStoragePath());
success &= localFile.delete();
if (success) {
file.setStoragePath(null);
saveFile(file);
File localFile = new File(file.getStoragePath());
success &= localFile.delete();
if (success) {
file.setStoragePath(null);
saveFile(file);