Gradle: EA-53148 - NPE: AbstractExternalSystemConfigurable.getProjectName

This commit is contained in:
Vladislav.Soroka
2014-01-21 16:24:41 +04:00
parent 0982afc3ca
commit b8ddcd45f5
@@ -190,7 +190,7 @@ public abstract class AbstractExternalSystemConfigurable<
@NotNull
protected String getProjectName(@NotNull String path) {
File file = new File(path);
return file.isDirectory() ? file.getName() : file.getParentFile().getName();
return file.isDirectory() || file.getParentFile() == null ? file.getName() : file.getParentFile().getName();
}
private void prepareSystemSettings(@NotNull SystemSettings s) {