/* ownCloud Android client application\r
* Copyright (C) 2011 Bartek Przybylski\r
+ * Copyright (C) 2012-2013 ownCloud Inc.\r
*\r
* This program is free software: you can redistribute it and/or modify\r
* it under the terms of the GNU General Public License as published by\r
- * the Free Software Foundation, either version 3 of the License, or\r
+ * the Free Software Foundation, either version 2 of the License, or\r
* (at your option) any later version.\r
*\r
* This program is distributed in the hope that it will be useful,\r
private void backToDisplayActivity() {\r
Intent intent = new Intent(this, FileDisplayActivity.class);\r
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\r
- intent.putExtra(FileDetailFragment.EXTRA_FILE, mFile);\r
+ OCFile targetFile = null;\r
+ if (mFile != null) {\r
+ targetFile = mStorageManager.getFileById(mFile.getParentId());\r
+ }\r
+ intent.putExtra(FileDetailFragment.EXTRA_FILE, targetFile);\r
intent.putExtra(FileDetailFragment.EXTRA_ACCOUNT, mAccount);\r
startActivity(intent);\r
finish();\r