diff options
author | Martin Stockhammer <martin_s@apache.org> | 2020-02-29 18:52:24 +0100 |
---|---|---|
committer | Martin Stockhammer <martin_s@apache.org> | 2020-02-29 18:52:24 +0100 |
commit | 24aba5ac73da0ad83caf43ce606f07cd57bc2891 (patch) | |
tree | d8c5c2262c6998e8331bb2f99549e995fc8c4abc /archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers | |
parent | de22e846edafd2ba8b06ab135be43b4c596c3db0 (diff) | |
download | archiva-24aba5ac73da0ad83caf43ce606f07cd57bc2891.tar.gz archiva-24aba5ac73da0ad83caf43ce606f07cd57bc2891.zip |
Moving storage utility methods to api module
Diffstat (limited to 'archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers')
-rw-r--r-- | archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/AbstractRepositoryPurge.java | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/AbstractRepositoryPurge.java b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/AbstractRepositoryPurge.java index a8daf16a2..a3979e6a1 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/AbstractRepositoryPurge.java +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/AbstractRepositoryPurge.java @@ -28,8 +28,9 @@ import org.apache.archiva.model.ArtifactReference; import org.apache.archiva.repository.ContentNotFoundException; import org.apache.archiva.repository.ManagedRepositoryContent; import org.apache.archiva.metadata.audit.RepositoryListener; +import org.apache.archiva.repository.storage.FsStorageUtil; import org.apache.archiva.repository.storage.StorageAsset; -import org.apache.archiva.repository.storage.StorageUtil; +import org.apache.archiva.repository.storage.util.StorageUtil; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -419,17 +420,9 @@ public abstract class AbstractRepositoryPurge final String artifactName = artifactFile.getName( ); - try - { - - StorageUtil.recurse(parentDir, a -> { - if (!a.isContainer() && a.getName().startsWith(artifactName)) deleteSilently(a); - }, true, 3 ); - } - catch ( IOException e ) - { - log.error( "Purge of support files failed {}: {}", artifactFile, e.getMessage( ), e ); - } + StorageUtil.walk(parentDir, a -> { + if (!a.isContainer() && a.getName().startsWith(artifactName)) deleteSilently(a); + }); } |