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
|
@ -91,6 +91,8 @@ public class IndexContentConsumer
|
||||||
|
|
||||||
private File repositoryDir;
|
private File repositoryDir;
|
||||||
|
|
||||||
|
private String repositoryId;
|
||||||
|
|
||||||
public String getId()
|
public String getId()
|
||||||
{
|
{
|
||||||
return this.id;
|
return this.id;
|
||||||
|
@ -124,6 +126,7 @@ public class IndexContentConsumer
|
||||||
throw new ConsumerException( "Consumer requires managed repository." );
|
throw new ConsumerException( "Consumer requires managed repository." );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.repositoryId = repository.getId();
|
||||||
this.repositoryDir = new File( repository.getUrl().getPath() );
|
this.repositoryDir = new File( repository.getUrl().getPath() );
|
||||||
this.index = indexFactory.createFileContentIndex( repository );
|
this.index = indexFactory.createFileContentIndex( repository );
|
||||||
}
|
}
|
||||||
|
@ -135,6 +138,7 @@ public class IndexContentConsumer
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
File file = new File( repositoryDir, path );
|
File file = new File( repositoryDir, path );
|
||||||
|
record.setRepositoryId( this.repositoryId );
|
||||||
record.setFilename( path );
|
record.setFilename( path );
|
||||||
record.setContents( FileUtils.readFileToString( file, null ) );
|
record.setContents( FileUtils.readFileToString( file, null ) );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue