collapsed nested if statements

Former-commit-id: 7e70e8a399042c413e86a772b6345fc6e52df235
This commit is contained in:
Jeremy Long
2013-05-27 19:58:26 -04:00
parent 4bda5b619d
commit 88037af7ef

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;
}