X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/d0767f1a4f45c5ab5ef57fa609688e2a1cc56b36..77ddd1ccb62e8b70580b8f410dda703a269f224f:/src/com/owncloud/android/ui/activity/FileDetailActivity.java diff --git a/src/com/owncloud/android/ui/activity/FileDetailActivity.java b/src/com/owncloud/android/ui/activity/FileDetailActivity.java index 2ab8bcc9..ba948d36 100644 --- a/src/com/owncloud/android/ui/activity/FileDetailActivity.java +++ b/src/com/owncloud/android/ui/activity/FileDetailActivity.java @@ -1,9 +1,10 @@ /* ownCloud Android client application * Copyright (C) 2011 Bartek Przybylski + * Copyright (C) 2012-2013 ownCloud Inc. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or + * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, @@ -258,7 +259,11 @@ public class FileDetailActivity extends SherlockFragmentActivity implements File private void backToDisplayActivity() { Intent intent = new Intent(this, FileDisplayActivity.class); intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); - intent.putExtra(FileDetailFragment.EXTRA_FILE, mFile); + OCFile targetFile = null; + if (mFile != null) { + targetFile = mStorageManager.getFileById(mFile.getParentId()); + } + intent.putExtra(FileDetailFragment.EXTRA_FILE, targetFile); intent.putExtra(FileDetailFragment.EXTRA_ACCOUNT, mAccount); startActivity(intent); finish();