]> source.dussan.org Git - archiva.git/commitdiff
ooops fix compilation
authorOlivier Lamy <olamy@apache.org>
Wed, 7 Oct 2015 01:19:27 +0000 (12:19 +1100)
committerOlivier Lamy <olamy@apache.org>
Wed, 7 Oct 2015 01:19:27 +0000 (12:19 +1100)
archiva-modules/plugins/metadata-store-file/src/main/java/org/apache/archiva/metadata/repository/file/FileMetadataRepository.java

index da3c4447014a16e8d6f15bbc512bd74c8f8c4f66..2cea31c3673e6875f2cab486dc0182dcd3208e4d 100644 (file)
@@ -420,10 +420,7 @@ public class FileMetadataRepository
         try
         {
             File dir = getMetadataDirectory( repositoryId, facetId );
-            if ( !Files.deleteIfExists( dir.toPath() ) )
-            {
-                log.error( "Cannot delete the metadata repository {}", dir );
-            }
+            FileUtils.deleteDirectory( dir );
         }
         catch ( IOException e )
         {
@@ -438,10 +435,7 @@ public class FileMetadataRepository
         try
         {
             File dir = new File( getMetadataDirectory( repoId, facetId ), name );
-            if ( !Files.deleteIfExists( dir.toPath() ) )
-            {
-                log.error( "Cannot delete the metadata repository {}", dir );
-            }
+            FileUtils.deleteDirectory( dir );
         }
         catch ( IOException e )
         {
@@ -778,7 +772,7 @@ public class FileMetadataRepository
                 }
             }
 
-            Files.deleteIfExists( directory.toPath() );
+            FileUtils.deleteDirectory( directory );
             //writeProperties( properties, directory, PROJECT_VERSION_METADATA_KEY );
         }
         catch ( IOException e )
@@ -812,10 +806,7 @@ public class FileMetadataRepository
         try
         {
             File dir = getDirectory( repoId );
-            if ( !Files.deleteIfExists( dir.toPath() ) )
-            {
-                log.error( "Cannot delete repository {}", dir );
-            }
+            FileUtils.deleteDirectory( dir );
         }
         catch ( IOException e )
         {
@@ -1365,7 +1356,7 @@ public class FileMetadataRepository
         try
         {
             File directory = new File( getDirectory( repositoryId ), namespace + "/" + projectId );
-            Files.deleteIfExists( directory.toPath() );
+            FileUtils.deleteDirectory( directory );
         }
         catch ( IOException e )
         {
@@ -1380,7 +1371,7 @@ public class FileMetadataRepository
         try
         {
             File directory = new File( getDirectory( repoId ), namespace + "/" + projectId + "/" + projectVersion );
-            Files.deleteIfExists( directory.toPath() );
+            FileUtils.deleteDirectory( directory );
         }
         catch ( IOException e )
         {