Commit e387aede authored by Ihrig, Arvid Conrad (ari)'s avatar Ihrig, Arvid Conrad (ari)
Browse files

Integrated Pipeline: fixed an incorrect URI

parent f1206b2a
......@@ -32,7 +32,7 @@ case class CandidateFound(
def mainFileUri: String = {
fileTree.treeType match {
case TreeType.Zip => "nmd://" + relativePath.toString
case TreeType.Zip => s"nmd://${fileTree.archiveId}/${relativePath.toString}"
case TreeType.Directory => fileTree.treeBasePath.resolve(relativePath).toAbsolutePath.toUri.toString
case _ => "unknown://${treeTask.treeBasePath.resolve(relativePath).toAbsolutePath.toString}"
}
......
......@@ -169,7 +169,7 @@ class CalculationParsingEngineSpec extends WordSpec with MockitoSugar with TestD
"parse the temporarily extracted main file when handling zip archives" in {
val f = new Fixture
val treeTask = aFileTree().withTreeType(TreeType.Zip)
val treeTask = aFileTree().withTreeType(TreeType.Zip).withBasePath(s"/foo/R${"x" * 28}.zip")
val extractedPath = Paths.get("/tmp/extracted/magic")
val task = sampleParseRequest.withFileTree(treeTask).withExtractedPath(Some(extractedPath))
f.worker.processSignal(task)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment