Skip to content

Commit

Permalink
fix file detection
Browse files Browse the repository at this point in the history
  • Loading branch information
AsterITA committed Jul 1, 2024
1 parent 2ec690a commit 399374b
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1091,10 +1091,10 @@ final case class EServicesApiServiceImpl(
case None => Right(())
}
_ <- {
val filePaths = Files.list(path).iterator().asScala.map(_.toString).toSet
val allowedFiles = Set("configuration.json") ++
importedEservice.descriptor.docs.map(_.path) ++
importedEservice.descriptor.interface.map(_.path)
val filePaths = Files.list(path).iterator().asScala.map(_.getFileName.toString).toSet
val allowedFiles = Set("configuration.json", "documents") ++
importedEservice.descriptor.docs.map(_.path.split("/").last) ++
importedEservice.descriptor.interface.map(_.path.split("/").last)

val extraFiles = filePaths -- allowedFiles
Either.cond(
Expand Down

0 comments on commit 399374b

Please sign in to comment.