From b2ced491a9b1d7d3b446142ce743d28c1ae4d50e Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Wed, 7 Oct 2015 12:19:27 +1100 Subject: [PATCH] ooops fix compilation --- .../file/FileMetadataRepository.java | 21 ++++++------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/archiva-modules/plugins/metadata-store-file/src/main/java/org/apache/archiva/metadata/repository/file/FileMetadataRepository.java b/archiva-modules/plugins/metadata-store-file/src/main/java/org/apache/archiva/metadata/repository/file/FileMetadataRepository.java index da3c44470..2cea31c36 100644 --- a/archiva-modules/plugins/metadata-store-file/src/main/java/org/apache/archiva/metadata/repository/file/FileMetadataRepository.java +++ b/archiva-modules/plugins/metadata-store-file/src/main/java/org/apache/archiva/metadata/repository/file/FileMetadataRepository.java @@ -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 ) { -- 2.39.5