[INST] Fixed bug to check duplicated sdk data path. 17/21117/1
authoryongsung1.kim <yongsung1.kim@samsung.com>
Thu, 15 May 2014 07:41:10 +0000 (16:41 +0900)
committeryongsung1.kim <yongsung1.kim@samsung.com>
Thu, 15 May 2014 07:41:10 +0000 (16:41 +0900)
Change-Id: Ia86c6482e2fe950dbcfa3318fce0f7ad0f93d509
Signed-off-by: yongsung1.kim <yongsung1.kim@samsung.com>
InstallManager_java/src/org/tizen/installmanager/ui/page/SetInstallDirectoryPage.java

index 1cd958a..1e19175 100644 (file)
@@ -223,7 +223,7 @@ public class SetInstallDirectoryPage extends InstallPage {
                                                        isAvailablePath = true;
                                                }
                                                if (isAvailablePath == true) {
-                                                       File strFile = new File(strDir + File.separator + Config.SDK_DIRECTORY);
+                                                       File strFile = new File(strDir);
                                                        setTextStyle(installDirectoryText, strFile.getAbsolutePath());
                                                        setAvailableSpace(strDir);
                                                        spaceRequiredLabel.setText("Download size : " + convertToVolumeSize(requiredSize)
@@ -302,7 +302,7 @@ public class SetInstallDirectoryPage extends InstallPage {
                        public void mouseDown(MouseEvent e) {
                                        String strDir = showSettingSDKWorkSpacePathDlg();
                                        if (strDir != null) {
-                                               File strFile = new File(strDir + File.separator + Config.CONFIG_DIRECTORY_NAME);
+                                               File strFile = new File(strDir);
                                                setTextStyle(sdkDataText, strFile.getAbsolutePath());
                                        }
                                }
@@ -356,7 +356,8 @@ public class SetInstallDirectoryPage extends InstallPage {
                        }                       
                } else if (sdkLabel == SDKLABEL.DATAPATH) {
                        File dataPath = new File(path);
-                       if (dataPath.exists()) {
+                       File[] children = dataPath.listFiles();
+                       if (children.length != 0) {
                                return false;
                        } else {
                                return true;