Skip to content

Commit

Permalink
fix: incorrect translation pattern on upload (windows) (#544)
Browse files Browse the repository at this point in the history
  • Loading branch information
yzerk committed Apr 11, 2023
1 parent 21cb107 commit d0a30af
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,8 @@ public static String replaceDoubleAsterisk(String sourcePattern, String translat
String[] sourceNodesTmp = sourceNodes[i].split(Utils.PATH_SEPARATOR_REGEX);
for (String sourceNode : sourceNodesTmp) {
String s = Utils.PATH_SEPARATOR + sourceNode + Utils.PATH_SEPARATOR;
s = Utils.regexPath(s);
if (sourceFile.contains(s)) {
sourceFile = sourceFile.replaceFirst(s, Utils.PATH_SEPARATOR);
sourceFile = sourceFile.replaceFirst(Utils.regexPath(s), Utils.regexPath(Utils.PATH_SEPARATOR));
} else if (StringUtils.indexOfAny(s, new String[]{"*", "?", "[", "]", "."}) >= 0) {
if (sourceFile.lastIndexOf(Utils.PATH_SEPARATOR) > 0) {
sourceFile = sourceFile.substring(0, sourceFile.lastIndexOf(Utils.PATH_SEPARATOR));
Expand Down

0 comments on commit d0a30af

Please sign in to comment.