On Tue, 2006-03-21 at 14:40 +0000, [EMAIL PROTECTED] wrote:
> Revision
>         1700
> Author
>         jreyes
> Date
>         2006-03-21 09:40:22 -0500 (Tue, 21 Mar 2006)
> Log Message
> o Fixed bug when ${basedir} contained a period ('.')
> Modified Paths
>       * 
> trunk/mojo/mojo-sandbox/hibernate3-maven-plugin/src/main/java/org/codehaus/mojo/hibernate3/HibernateUtils.java
> Diff
> Modified:
> trunk/mojo/mojo-sandbox/hibernate3-maven-plugin/src/main/java/org/codehaus/mojo/hibernate3/HibernateUtils.java
>  (1699 => 1700)
> --- 
> trunk/mojo/mojo-sandbox/hibernate3-maven-plugin/src/main/java/org/codehaus/mojo/hibernate3/HibernateUtils.java
>     2006-03-21 02:28:54 UTC (rev 1699)
> +++ 
> trunk/mojo/mojo-sandbox/hibernate3-maven-plugin/src/main/java/org/codehaus/mojo/hibernate3/HibernateUtils.java
>     2006-03-21 14:40:22 UTC (rev 1700)
> @@ -49,41 +49,34 @@
>      /**
>       * Checks if the directory is in fact a directory path and creates it if 
> it is necessary.
>       *
> -     * @param directory the directory
> -     * @param parameter name of the parameter calling this method
> +     * @param parent        parent file
> +     * @param directoryPath child directory path
> +     * @param parameter     name of the parameter calling this method
>       * @return the directory as a File object
>       * @throws MojoExecutionException if the directory is not a directory
>       */
> -    public static File prepareDirectory( File directory, String parameter )
> +    public static File prepareDirectory( File parent, String directoryPath, 
> String parameter )
>          throws MojoExecutionException
>      {
> +        if ( directoryPath.indexOf( '.' ) != -1 )
> +        {
> +            throw new MojoExecutionException( "<" + parameter + "> is not a 
> directory." );
> +        }
> +

What about using File.isDirectory() here?

--
Trygve

Reply via email to