From 6b99c307ddf09acd0dac26ce331f181ad8ae2f6c Mon Sep 17 00:00:00 2001 From: Sollace Date: Mon, 5 Nov 2018 16:42:43 +0200 Subject: [PATCH] Explain and add "_-" --- build.gradle | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index 8295419d..4b79b7fd 100644 --- a/build.gradle +++ b/build.gradle @@ -113,7 +113,9 @@ archivesBaseName = "mod-${project.name.toLowerCase()}" task copyBGPones(type: Copy) { delete "${buildDir}/skins/assets/minelittlepony/textures/entity/pony" - def permittedChars = /[^0-9a-z\",\{\}\[\]\(\):\'\.\/ ]/ + // use the same rejex for both filenames and the bgponies.json + // Otherwise there could be errors because of the names in the json not matching the ones on disk + def permittedChars = /[^0-9a-z_-\",\t\{\}\[\]\(\):\'\.\/ ]/ from("skins/Background Ponies") { exclude "bgponies.json" @@ -129,8 +131,7 @@ task copyBGPones(type: Copy) { filter { line -> line.toLowerCase() - .replaceAll('\t', ' ') - .replaceAll(permittedChars, '') + .replaceAll(permittedCharsJSON, '') } }