On 19/11/2010, at 9:47 PM, [email protected] wrote:

>             File srcFolder = new File( src );
> -            File destFolder = new File( dest );
> +            File destFolder = new File( installationLocation );
> 
> -            new File( dest ).mkdirs();
> +            new File( installationLocation ).mkdirs();

...

> +    private void getInstallationLocation()
> +    {
> +        if ( installationLocation == null || installationLocation.length() 
> == 0 )
> +        {
> +            String programFilesPath = System.getenv( "PROGRAMFILES" );
> +
> +            if ( programFilesPath == null || programFilesPath.length() == 0 )
> +            {
> +                         programFilesPath = System.getProperty( "user.dir" );
> +                     }
> +                installationLocation = programFilesPath + File.separator + 
> "NPanday";
> +        }
> +
> +        installationLocation = installationLocation + File.separator + "bin";
> +    }

I'd suggest making installationLocation a File type to start with - Maven will 
deal with it correctly. You should avoid pasting together paths - see this 
comment: 
https://issues.apache.org/jira/browse/NPANDAY-345?focusedCommentId=12932941&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12932941

That would also avoid needing to convert it twice in the earlier example.

- Brett

--
Brett Porter
[email protected]
http://brettporter.wordpress.com/




Reply via email to