} else { // File case
File parent = PathUtil.makeParent(targetFile.getAbsolutePath());
- if (!parent.getAbsolutePath().equalsIgnoreCase(sdkTempDir)) {
+ if (parent != null && !parent.getAbsolutePath().equalsIgnoreCase(sdkTempDir)) {
cnt = PathUtil.getParentCnt(fileNameToUnzip);
}
if (0 > UnzipUtil.unzipEntry(zis, targetFile)) {
unzipSDKImage();
}
- if (Registry.getInstalledPath() != "") {
+ if (Registry.getInstalledPath() != null && !Registry.getInstalledPath().equals("")) {
List<String> all = new ArrayList<String>();
all.add("all");
if (cliUninstall(all)) {
}
public static boolean cliNetworkInstall(List<String> packageNames) throws IMExitException {
- if (Registry.getInstalledPath() != "") {
+ if (Registry.getInstalledPath() != null && !Registry.getInstalledPath().equals("") ) {
String installRepo = Config.getInstance().getConfigFile().getRepository();
String installDist = Config.getInstance().getConfigFile().getDistribution();
String remoteRepo = Options.repository;
}
public static boolean cliUninstall(List<String> packageNames) throws IMExitException {
- if (Registry.getInstalledPath() == "") {
+ if (Registry.getInstalledPath() != null && Registry.getInstalledPath().equals("")) {
System.out.println("Tizen SDK was not installed.");
return false;
} else {