[Title] Fixed a bug that modified rootstrap use local path
authordonghee yang <donghee.yang@samsung.com>
Wed, 9 Jan 2013 08:20:16 +0000 (17:20 +0900)
committerdonghee yang <donghee.yang@samsung.com>
Wed, 9 Jan 2013 08:20:16 +0000 (17:20 +0900)
org.tizen.nativeplatform/src/org/tizen/nativeplatform/rootstrap/RootstrapManager.java

index b3cb41b..968bbbc 100644 (file)
@@ -595,7 +595,7 @@ public class RootstrapManager {
                        if (path == null) {
                                attrPath.setValue( getUserRootstrapPathOfXml(name) );
                        } else {
-                               attrPath.setValue( path );
+                               attrPath.setValue( getRootstrapPathOfXml(path) );
                        }
                        Attr attrType =  doc.createAttribute("supportToolchainType");
                        attrType.setValue("tizen.obs");
@@ -714,6 +714,12 @@ public class RootstrapManager {
        private static String getUserRootstrapPathOfXml(String id ) {
                String rootstrapPath = getUserRootstrapPath(id);
                
-               return rootstrapPath.replaceAll(InstallPathConfig.getUserDataPath(), "#{HOME}/tizen-sdk-data");
+               return getRootstrapPathOfXml(rootstrapPath);
+       }
+       
+       
+       private static String getRootstrapPathOfXml( String path ) {
+               return path.replaceAll(String.format("%s/",InstallPathConfig.getSDKPath()), "#{SBI_HOME}/../../").
+                               replaceAll(String.format("%s/",InstallPathConfig.getUserDataPath()), "#{HOME}/tizen-sdk-data/");
        }
 }