X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/d7c4d1248587e87ad5320c6f1df66e8d422ea3aa..31ccf4e966f6bd9a4e0716dbec7e6830c36aa94b:/src/com/owncloud/android/operations/SynchronizeFolderOperation.java diff --git a/src/com/owncloud/android/operations/SynchronizeFolderOperation.java b/src/com/owncloud/android/operations/SynchronizeFolderOperation.java index 433a0908..f8b69f4a 100644 --- a/src/com/owncloud/android/operations/SynchronizeFolderOperation.java +++ b/src/com/owncloud/android/operations/SynchronizeFolderOperation.java @@ -206,9 +206,9 @@ public class SynchronizeFolderOperation extends RemoteOperation { Log_OC.i(TAG, "Synchronized " + mAccount.name + remotePath + ": " + result.getLogMessage()); } else { if (result.isException()) { - Log_OC.e(TAG, "Synchroned " + mAccount.name + remotePath + ": " + result.getLogMessage(), result.getException()); + Log_OC.e(TAG, "Synchronized " + mAccount.name + remotePath + ": " + result.getLogMessage(), result.getException()); } else { - Log_OC.e(TAG, "Synchroned " + mAccount.name + remotePath + ": " + result.getLogMessage()); + Log_OC.e(TAG, "Synchronized " + mAccount.name + remotePath + ": " + result.getLogMessage()); } } @@ -327,12 +327,16 @@ public class SynchronizeFolderOperation extends RemoteOperation { private void removeObsoleteFiles() { mChildren = mStorageManager.getDirectoryContent(mLocalFolder); OCFile file; - String currentSavePath = FileStorageUtils.getSavePath(mAccount.name); for (int i=0; i < mChildren.size(); ) { file = mChildren.get(i); if (file.getLastSyncDateForProperties() != mCurrentSyncTime) { - Log_OC.d(TAG, "removing file: " + file); - mStorageManager.removeFile(file, (file.isDown() && file.getStoragePath().startsWith(currentSavePath))); + if (file.isDirectory()) { + Log_OC.d(TAG, "removing folder: " + file); + mStorageManager.removeDirectory(file, true, true); + } else { + Log_OC.d(TAG, "removing file: " + file); + mStorageManager.removeFile(file, true); + } mChildren.remove(i); } else { i++;