mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-01-06 16:37:58 +01:00
Dashes no longer encoded in exported filenames
This commit is contained in:
parent
7aca4fc0b1
commit
0c92fbbaa2
@ -70,7 +70,11 @@ abstract class FileExporter {
|
|||||||
|
|
||||||
String toFileName(String resourceName) {
|
String toFileName(String resourceName) {
|
||||||
try {
|
try {
|
||||||
return URLEncoder.encode(resourceName, "UTF-8").replace(".", "%2E");
|
return StringUtils.replaceEach(
|
||||||
|
URLEncoder.encode(resourceName, "UTF-8"),
|
||||||
|
new String[]{".", "%2F"},
|
||||||
|
new String[]{"%2E", "-"}
|
||||||
|
);
|
||||||
} catch (UnsupportedEncodingException e) {
|
} catch (UnsupportedEncodingException e) {
|
||||||
throw new IllegalStateException("Unexpected: UTF-8 encoding not supported", e);
|
throw new IllegalStateException("Unexpected: UTF-8 encoding not supported", e);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user