mirror of https://github.com/apache/archiva.git
Fixing whoops in repository id handling
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@541704 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
fd3c19b4f0
commit
6bfec56ad8
|
@ -90,6 +90,8 @@ public class IndexContentConsumer
|
|||
private RepositoryContentIndex index;
|
||||
|
||||
private File repositoryDir;
|
||||
|
||||
private String repositoryId;
|
||||
|
||||
public String getId()
|
||||
{
|
||||
|
@ -124,6 +126,7 @@ public class IndexContentConsumer
|
|||
throw new ConsumerException( "Consumer requires managed repository." );
|
||||
}
|
||||
|
||||
this.repositoryId = repository.getId();
|
||||
this.repositoryDir = new File( repository.getUrl().getPath() );
|
||||
this.index = indexFactory.createFileContentIndex( repository );
|
||||
}
|
||||
|
@ -135,6 +138,7 @@ public class IndexContentConsumer
|
|||
try
|
||||
{
|
||||
File file = new File( repositoryDir, path );
|
||||
record.setRepositoryId( this.repositoryId );
|
||||
record.setFilename( path );
|
||||
record.setContents( FileUtils.readFileToString( file, null ) );
|
||||
|
||||
|
|
Loading…
Reference in New Issue