aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2013-02-06 21:21:18 +0000
committerOlivier Lamy <olamy@apache.org>2013-02-06 21:21:18 +0000
commit6131e693a9941302bb0cf147c24ec050f9f62715 (patch)
tree7dbe8858c86ac469d7d7965988d36650c9fbc623
parentc606acd784be6d7dac8f4647510b524780820fea (diff)
downloadarchiva-6131e693a9941302bb0cf147c24ec050f9f62715.tar.gz
archiva-6131e693a9941302bb0cf147c24ec050f9f62715.zip
correctly delete previous index directory
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1443217 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/managed/DefaultManagedRepositoryAdmin.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/managed/DefaultManagedRepositoryAdmin.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/managed/DefaultManagedRepositoryAdmin.java
index 0617266d7..b110d4285 100644
--- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/managed/DefaultManagedRepositoryAdmin.java
+++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/managed/DefaultManagedRepositoryAdmin.java
@@ -532,6 +532,11 @@ public class DefaultManagedRepositoryAdmin
{
indexer.removeIndexingContext( indexingContext, true );
}
+
+ // delete directory too as only content is deleted
+ File indexDirectory = indexingContext.getIndexDirectoryFile();
+ FileUtils.deleteDirectory( indexDirectory );
+
createIndexContext( managedRepository );
}
catch ( IOException e )