From 0aef684087c266b5e79a2693592748a53cc87a56 Mon Sep 17 00:00:00 2001 From: "David A. Velasco" Date: Tue, 8 Oct 2013 09:19:52 +0200 Subject: [PATCH] Fixed some crashes in refresh of current folder --- .../android/operations/SynchronizeFolderOperation.java | 4 ++-- src/com/owncloud/android/ui/activity/FileDisplayActivity.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/com/owncloud/android/operations/SynchronizeFolderOperation.java b/src/com/owncloud/android/operations/SynchronizeFolderOperation.java index 433a0908f3..4935a6164c 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 1e41889e8a..6e2091b124 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