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:
Joakim Erdfelt 2007-05-25 16:07:36 +00:00
parent fd3c19b4f0
commit 6bfec56ad8
1 changed files with 4 additions and 0 deletions

View File

@ -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 ) );