mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-07-18 02:18:20 +00:00
Issue #314 Better name to filename conversion
This commit is contained in:
@@ -436,6 +436,12 @@ public class Helper {
|
||||
}
|
||||
}
|
||||
str = sb.toString();
|
||||
if (str.endsWith(" ")) {
|
||||
str = str.substring(0, str.length() - 1) + "%20";
|
||||
}
|
||||
if (str.endsWith(".")) {
|
||||
str = str.substring(0, str.length() - 1) + "%2E";
|
||||
}
|
||||
str = "." + str + ".";
|
||||
for (String inv : invalidFilenamesParts) {
|
||||
str = Pattern.compile("\\." + Pattern.quote(inv) + "\\.", Pattern.CASE_INSENSITIVE).matcher(str).replaceAll("._" + inv + ".");
|
||||
|
||||
Reference in New Issue
Block a user