collapsed nested if statements

Former-commit-id: e4d466f50e76659bece83b46f8a111a3d8225353
This commit is contained in:
Jeremy Long
2013-05-27 19:58:26 -04:00
parent e0e85c468a
commit 7c14017db3

View File

@@ -70,11 +70,9 @@ public class Index extends AbstractIndex {
*/
public File getDataDirectory() throws IOException {
final String fileName = Settings.getString(Settings.KEYS.CPE_INDEX);
File path = FileUtils.getDataDirectory(fileName, Index.class);
if (!path.exists()) {
if (!path.mkdirs()) {
throw new IOException("Unable to create CPE Data directory");
}
final File path = FileUtils.getDataDirectory(fileName, Index.class);
if (!path.exists() && !path.mkdirs()) {
throw new IOException("Unable to create CPE Data directory");
}
return path;
}