geforkt von Mirrors/Paper
don't copy patch folders recursively in gibWork
Dieser Commit ist enthalten in:
Ursprung
83b7370131
Commit
5c68cc7cef
@ -90,7 +90,6 @@ tasks.register("gibWork") {
|
|||||||
val patchesFolder = layout.projectDirectory.dir("paper-server/patches/").convertToPath()
|
val patchesFolder = layout.projectDirectory.dir("paper-server/patches/").convertToPath()
|
||||||
val storage = layout.cache.resolve("last-updating-folder").also { it.parent.createDirectories() }
|
val storage = layout.cache.resolve("last-updating-folder").also { it.parent.createDirectories() }
|
||||||
|
|
||||||
@OptIn(ExperimentalPathApi::class)
|
|
||||||
doLast {
|
doLast {
|
||||||
val html = URI(issue).toURL().readText()
|
val html = URI(issue).toURL().readText()
|
||||||
|
|
||||||
@ -112,11 +111,13 @@ tasks.register("gibWork") {
|
|||||||
if (!dir.exists()) {
|
if (!dir.exists()) {
|
||||||
error("Unapplied patch folder $next does not exist, did someone else already check it out and forgot to mark it?")
|
error("Unapplied patch folder $next does not exist, did someone else already check it out and forgot to mark it?")
|
||||||
}
|
}
|
||||||
dir.copyToRecursively(
|
dir.listDirectoryEntries("*.patch").forEach { patch ->
|
||||||
patchesFolder.resolve("sources").resolve(next)
|
patch.copyTo(patchesFolder.resolve("sources").resolve(next).resolve(patch.fileName).also { it.createDirectories() }, overwrite = true)
|
||||||
.also { it.createDirectories() }, overwrite = true, followLinks = false
|
patch.deleteIfExists()
|
||||||
)
|
}
|
||||||
dir.deleteRecursively()
|
if (dir.listDirectoryEntries().isEmpty()) {
|
||||||
|
dir.deleteIfExists()
|
||||||
|
}
|
||||||
|
|
||||||
storage.writeText(next)
|
storage.writeText(next)
|
||||||
println("please tick the box in the issue: $issue")
|
println("please tick the box in the issue: $issue")
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren