Commit 8955cf12 authored by Liang Ding's avatar Liang Ding

🎨 文件名过滤

parent 4b3f5de0
...@@ -244,8 +244,8 @@ public final class Solos { ...@@ -244,8 +244,8 @@ public final class Solos {
*/ */
public static String sanitizeFilename(final String unsanitized) { public static String sanitizeFilename(final String unsanitized) {
return unsanitized. return unsanitized.
replaceAll("[\\?\\\\/:|<>\\*]", " "). // filter out ? \ / : | < > * replaceAll("[\\?\\\\/:|<>\\*\\[\\]]", "-"). // ? \ / : | < > * [ ] to -
replaceAll("\\s+", "_"); // white space as underscores replaceAll("\\s+", "-"); // white space to -
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment