Skip to content

Commit

Permalink
fixed the flag window error (#2811)
Browse files Browse the repository at this point in the history
  • Loading branch information
tigershi authored Nov 14, 2023
1 parent c9120fa commit f60c578
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import java.nio.charset.StandardCharsets;
import java.util.HashMap;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;

Expand Down Expand Up @@ -78,7 +79,7 @@ protected void initZipCountryFlagPattern() {
private void writeCountryFlagResult(String sourcePathStr, String fileContent, String newFileNameSuffix) throws IOException {

String pathStr = ConstantsKeys.IMAGE + sourcePathStr;
pathStr = pathStr.replaceAll(ConstantsChar.BACKSLASH, File.separator);
pathStr = pathStr.replaceAll(ConstantsChar.BACKSLASH, Matcher.quoteReplacement(File.separator));
pathStr = pathStr.replaceAll(ConstantsFile.FILE_TYPE_SVG, newFileNameSuffix);
File file = new File(pathStr);
if (!file.getParentFile().exists()) {
Expand Down

0 comments on commit f60c578

Please sign in to comment.