mirror of https://github.com/apache/maven.git
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:
parent
80a077f1a8
commit
11bb73f1ec
|
@ -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 );
|
||||
|
|
|
@ -402,10 +402,7 @@ public class MBoot
|
|||
|
||||
// clean
|
||||
System.out.println( "Cleaning " + buildDirFile + "..." );
|
||||
if ( buildDirFile.exists() )
|
||||
{
|
||||
FileUtils.forceDelete( buildDirFile );
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
// Download deps
|
||||
|
|
Loading…
Reference in New Issue