[yocto] [eclipse-poky][PATCH] OptionsPage.java: improved handling of path concatenation in new project

Humberto Ibarra humberto.ibarra.lopez at intel.com
Wed May 18 12:32:58 PDT 2016


When creating a new Yocto Bitbake Commander project, the folder
separator is not being handled corretly. The problem is a folder and
a file to be concatenated are joined as Strings instead of paths.

This patch solves the issue by using a path joioning mechanism instead
of simply concatenating strings.

[Yocto #9648]
---
 .../src/org/yocto/bc/ui/wizards/install/OptionsPage.java                | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/install/OptionsPage.java b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/install/OptionsPage.java
index bd91ef9..56d81fb 100644
--- a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/install/OptionsPage.java
+++ b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/install/OptionsPage.java
@@ -166,7 +166,7 @@ public class OptionsPage extends FiniteStateWizardPage {
 			return false;
 		}
 
-		String projectPath = projectLoc + txtProjectName.getText();
+		String projectPath = new File(projectLoc,txtProjectName.getText()).getPath();
 		File prj_dir=new File(projectPath);
 		if(!prj_dir.isDirectory() || !prj_dir.exists()) {
 			if(!new File(projectPath + File.separator + InstallWizard.VALIDATION_FILE).exists()) {
-- 
2.4.11




More information about the yocto mailing list