diff --git a/jazzer-plugin/src/main/java/io/micronaut/fuzzing/jazzer/PrepareClusterFuzzTask.java b/jazzer-plugin/src/main/java/io/micronaut/fuzzing/jazzer/PrepareClusterFuzzTask.java index ec263fc..f6f8f96 100644 --- a/jazzer-plugin/src/main/java/io/micronaut/fuzzing/jazzer/PrepareClusterFuzzTask.java +++ b/jazzer-plugin/src/main/java/io/micronaut/fuzzing/jazzer/PrepareClusterFuzzTask.java @@ -1,8 +1,6 @@ package io.micronaut.fuzzing.jazzer; import org.gradle.api.file.DirectoryProperty; -import org.gradle.api.file.RegularFileProperty; -import org.gradle.api.tasks.InputFile; import org.gradle.api.tasks.OutputDirectory; import org.gradle.api.tasks.TaskAction; @@ -44,7 +42,7 @@ public void run() throws IOException { this_dir=$(dirname "$0") LD_LIBRARY_PATH="$JVM_LD_LIBRARY_PATH":$this_dir $this_dir/jazzer_driver --agent_path=$this_dir/jazzer_agent_deploy.jar %s $@ """.formatted(String.join(" ", args)); - Path targetPath = getOutputDirectory().file(targetClass.substring(targetClass.indexOf('.') + 1)).get().getAsFile().toPath(); + Path targetPath = getOutputDirectory().file(targetClass.substring(targetClass.lastIndexOf('.') + 1)).get().getAsFile().toPath(); Files.writeString(targetPath, sh); Files.setPosixFilePermissions(targetPath, Set.of( PosixFilePermission.OWNER_READ,