All of lore.kernel.org
 help / color / mirror / Atom feed
From: timothy.t.orling@linux.intel.com
To: timothy.t.orling@linux.intel.com
Cc: yocto@yoctoproject.org
Subject: Re: [eclipse-poky][PATCH v2] OptionsPage.java: improved handling of path concatenation in new project
Date: Thu, 19 May 2016 10:32:46 -0700 (PDT)	[thread overview]
Message-ID: <54211.10.24.0.29.1463679166.squirrel@linux.intel.com> (raw)
In-Reply-To: <52479.10.24.0.29.1463675537.squirrel@linux.intel.com>

Tested for luna-master plugin branch and yocto-2.0.1 docs branch.

Tested-by: Tim Orling <timothy.t.orling@linux.intel.com>

> Please add your 'Signed-off-by:'
> (e.g. use 'git commit -s')
>
> --Tim
>
>> 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            | 6
>> +++---
>>  1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> 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..3a2caa0 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,17 +166,17 @@ 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()) {
>> -				setErrorMessage("Directory " + txtProjectLocation.getText() +
>> txtProjectName.getText() + " is an invalid poky directory.");
>> +				setErrorMessage("Directory " + projectPath + " is an invalid poky
>> directory.");
>>  				return false;
>>  			}
>>  		}
>>
>>  		try {
>> -			URI location = new URI("file://" +
>> txtProjectLocation.getText()+File.separator+txtProjectName.getText());
>> +			URI location = new URI("file://" + projectPath);
>>  			IStatus status =
>> ResourcesPlugin.getWorkspace().validateProjectLocationURI(proj,
>> location);
>>  			if (!status.isOK()) {
>>  				setErrorMessage(status.getMessage());
>> --
>> 2.4.11
>>
>> --
>> _______________________________________________
>> yocto mailing list
>> yocto@yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/yocto
>>
>
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>



      reply	other threads:[~2016-05-19 16:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-18 20:29 [eclipse-poky][PATCH v2] OptionsPage.java: improved handling of path concatenation in new project Humberto Ibarra
2016-05-19 16:32 ` timothy.t.orling
2016-05-19 17:32   ` timothy.t.orling [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54211.10.24.0.29.1463679166.squirrel@linux.intel.com \
    --to=timothy.t.orling@linux.intel.com \
    --cc=yocto@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.