The test of existence of directory must be in forceDelete methods

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163012 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Emmanuel Venisse 2004-08-26 11:50:39 +00:00
parent 80a077f1a8
commit 11bb73f1ec
2 changed files with 11 additions and 4 deletions

View File

@ -912,6 +912,11 @@ public class FileUtils
public static void forceDelete( final File file )
throws IOException
{
if ( ! file.exists() )
{
return;
}
if ( file.isDirectory() )
{
deleteDirectory( file );
@ -934,6 +939,11 @@ public class FileUtils
public static void forceDeleteOnExit( final File file )
throws IOException
{
if ( ! file.exists() )
{
return;
}
if ( file.isDirectory() )
{
deleteDirectoryOnExit( file );

View File

@ -402,10 +402,7 @@ public class MBoot
// clean
System.out.println( "Cleaning " + buildDirFile + "..." );
if ( buildDirFile.exists() )
{
FileUtils.forceDelete( buildDirFile );
}
// ----------------------------------------------------------------------
// Download deps