aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers
diff options
context:
space:
mode:
authorMartin Stockhammer <martin_s@apache.org>2020-02-29 18:52:24 +0100
committerMartin Stockhammer <martin_s@apache.org>2020-02-29 18:52:24 +0100
commit24aba5ac73da0ad83caf43ce606f07cd57bc2891 (patch)
treed8c5c2262c6998e8331bb2f99549e995fc8c4abc /archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers
parentde22e846edafd2ba8b06ab135be43b4c596c3db0 (diff)
downloadarchiva-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.java17
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);
+ });
}