mirror of https://github.com/apache/archiva.git
[MRM-1315] delete artifact should log artifact audit information consistently
git-svn-id: https://svn.apache.org/repos/asf/archiva/branches/MRM-1025@900594 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
82f8a22ed6
commit
1f180c0a27
|
@ -211,7 +211,8 @@ public class DeleteArtifactAction
|
|||
|
||||
String path = repository.toMetadataPath( ref );
|
||||
int index = path.lastIndexOf( '/' );
|
||||
File targetPath = new File( repoConfig.getLocation(), path.substring( 0, index ) );
|
||||
path = path.substring( 0, index );
|
||||
File targetPath = new File( repoConfig.getLocation(), path );
|
||||
|
||||
if ( !targetPath.exists() )
|
||||
{
|
||||
|
@ -246,14 +247,14 @@ public class DeleteArtifactAction
|
|||
listener.deleteArtifact( repository.getId(), artifact.getNamespace(), artifact.getProject(),
|
||||
artifact.getVersion(), artifact.getId() );
|
||||
}
|
||||
|
||||
triggerAuditEvent( repositoryId, path, AuditEvent.REMOVE_FILE );
|
||||
}
|
||||
}
|
||||
|
||||
String msg = "Artifact \'" + groupId + ":" + artifactId + ":" + version +
|
||||
"\' was successfully deleted from repository \'" + repositoryId + "\'";
|
||||
|
||||
triggerAuditEvent( repositoryId, groupId + ":" + artifactId + ":" + version, AuditEvent.REMOVE_FILE );
|
||||
|
||||
addActionMessage( msg );
|
||||
|
||||
reset();
|
||||
|
|
Loading…
Reference in New Issue