diff --git a/ship/src/main/scala/ch/epfl/bluebrain/nexus/ship/files/FileCopier.scala b/ship/src/main/scala/ch/epfl/bluebrain/nexus/ship/files/FileCopier.scala index ae4efb580f..7a2ecb0528 100644 --- a/ship/src/main/scala/ch/epfl/bluebrain/nexus/ship/files/FileCopier.scala +++ b/ship/src/main/scala/ch/epfl/bluebrain/nexus/ship/files/FileCopier.scala @@ -39,7 +39,7 @@ object FileCopier { logError(logger, "s3Copy") ) - def localDiskPath(relative: Path): String = Paths.get(URI.create(s"file:/$relative")).toString + def localDiskPath(relative: Path): String = Paths.get(URI.create(s"file:/$relative")).toString.drop(1) sealed trait FileCopyResult extends Product with Serializable diff --git a/ship/src/test/scala/ch/epfl/bluebrain/nexus/ship/RunShipSuite.scala b/ship/src/test/scala/ch/epfl/bluebrain/nexus/ship/RunShipSuite.scala index 995d91c0ca..93e6a2fa1e 100644 --- a/ship/src/test/scala/ch/epfl/bluebrain/nexus/ship/RunShipSuite.scala +++ b/ship/src/test/scala/ch/epfl/bluebrain/nexus/ship/RunShipSuite.scala @@ -192,7 +192,7 @@ class RunShipSuite // Directory, should be skipped directoryId = iri"https://bbp.epfl.ch/neurosciencegraph/data/directory" _ <- checkFor("file", directoryId, xas).assertEquals(0) - // Summary S3 check, 4 objects should have been imported in total + // Summary S3 check, 5 objects should have been imported in total _ <- s3Client.listObjectsV2(targetBucket).map(_.keyCount().intValue()).assertEquals(5) // Summary report check, only the directory event should have been skipped _ = assertEquals(report.progress(Files.entityType).success, 6L) diff --git a/ship/src/test/scala/ch/epfl/bluebrain/nexus/ship/files/FileProcessorSuite.scala b/ship/src/test/scala/ch/epfl/bluebrain/nexus/ship/files/FileProcessorSuite.scala index b48d075fba..e1bee3e7d6 100644 --- a/ship/src/test/scala/ch/epfl/bluebrain/nexus/ship/files/FileProcessorSuite.scala +++ b/ship/src/test/scala/ch/epfl/bluebrain/nexus/ship/files/FileProcessorSuite.scala @@ -15,7 +15,7 @@ class FileProcessorSuite extends NexusSuite { test("Correctly decode a local path") { val encoded = Uri.Path("org/proj/9/f/0/3/2/4/f/e/0925_Rhi13.3.13%20cell%201+2%20(superficial).asc") val obtained = localDiskPath(encoded) - val expected = "/org/proj/9/f/0/3/2/4/f/e/0925_Rhi13.3.13 cell 1+2 (superficial).asc" + val expected = "org/proj/9/f/0/3/2/4/f/e/0925_Rhi13.3.13 cell 1+2 (superficial).asc" assertEquals(obtained, expected) }