From: David A. Velasco Date: Tue, 8 Oct 2013 07:19:52 +0000 (+0200) Subject: Fixed some crashes in refresh of current folder X-Git-Tag: oc-android-1.5.5~155^2~22 X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/commitdiff_plain/0aef684087c266b5e79a2693592748a53cc87a56?ds=inline Fixed some crashes in refresh of current folder --- diff --git a/src/com/owncloud/android/operations/SynchronizeFolderOperation.java b/src/com/owncloud/android/operations/SynchronizeFolderOperation.java index 433a0908..4935a616 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()); } } diff --git a/src/com/owncloud/android/ui/activity/FileDisplayActivity.java b/src/com/owncloud/android/ui/activity/FileDisplayActivity.java index 1e41889e..6e2091b1 100644 --- a/src/com/owncloud/android/ui/activity/FileDisplayActivity.java +++ b/src/com/owncloud/android/ui/activity/FileDisplayActivity.java @@ -870,8 +870,8 @@ OCFileListFragment.ContainerActivity, FileDetailFragment.ContainerActivity, OnNa String synchFolderRemotePath = intent.getStringExtra(FileSyncService.SYNC_FOLDER_REMOTE_PATH); - OCFile currentFile = mStorageManager.getFileById(getFile().getFileId()); - OCFile currentDir = mStorageManager.getFileById(getCurrentDir().getFileId()); + OCFile currentFile = (getFile() == null) ? null : mStorageManager.getFileById(getFile().getFileId()); + OCFile currentDir = (getCurrentDir() == null) ? null : mStorageManager.getFileById(getCurrentDir().getFileId()); if (currentDir == null) { // current folder was removed from the server