mirror of https://github.com/apache/archiva.git
simply use File implementation as we are now 1.7 required
This commit is contained in:
parent
7fba33c0bb
commit
9a09994c8c
|
@ -276,32 +276,7 @@ public class DefaultFileLockManager
|
|||
|
||||
private boolean mkdirs( File directory )
|
||||
{
|
||||
if ( directory == null )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( directory.exists() )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if ( directory.mkdir() )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
File canonDir = null;
|
||||
try
|
||||
{
|
||||
canonDir = directory.getCanonicalFile();
|
||||
}
|
||||
catch ( IOException e )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
File parentDir = canonDir.getParentFile();
|
||||
return ( parentDir != null && ( mkdirs( parentDir ) || parentDir.exists() ) && canonDir.mkdir() );
|
||||
return directory.mkdirs();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue