Skip to content

Commit 795083c

Browse files
authored
probable fix (#1113)
1 parent eb31a37 commit 795083c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
publishedPluginVersion=1.64.1
2-
pluginVersion=1.65.0-pre1
2+
pluginVersion=1.65.0-pre2
33
pluginName=readonlyrest
44

55
org.gradle.jvmargs=-Xmx6144m

ror-tools-core/src/main/scala/tech/beshu/ror/tools/core/patches/internal/filePatchers/JarManifestModifier.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ object JarManifestModifier {
2929
private val patchedByRorVersionPropertyName = "Patched-By-Ror-Version"
3030

3131
def addPatchedByRorVersionProperty(file: File, rorVersion: String): Unit = {
32+
val tempJarFile = File(s"temp-${UUID.randomUUID()}.jar")
3233
Using(new JarFile(file.toJava)) { jarFile =>
3334
// Using the better-files temporary files causes problems, probably because of permission issues when copying the file at the end of this method.
34-
val tempJarFile = File(s"temp-${UUID.randomUUID()}.jar")
3535
val manifest = jarFile.getManifest
3636
manifest.getMainAttributes.putValue(patchedByRorVersionPropertyName, rorVersion)
3737
Using(new JarOutputStream(tempJarFile.newOutputStream.buffered, manifest)) { jarOutput =>
@@ -40,11 +40,11 @@ object JarManifestModifier {
4040
ex => throw IllegalStateException(s"Could not copy content of jar file ${file.name} because of [${ex.getMessage}]", ex),
4141
(_: Unit) => ()
4242
)
43-
tempJarFile.moveTo(file)(File.CopyOptions(overwrite = true))
4443
}.fold(
4544
ex => throw IllegalStateException(s"Could not add ROR version to jar file ${file.name} because of [${ex.getMessage}]", ex),
46-
(_: File) => ()
45+
(_: Unit) => ()
4746
)
47+
tempJarFile.moveTo(file)(File.CopyOptions(overwrite = true))
4848
}
4949

5050
def findPatchedFiles(esDirectory: EsDirectory): List[PatchedJarFile] = {

0 commit comments

Comments
 (0)