Skip to content

Commit

Permalink
bug fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
ihorpopyk committed Jul 25, 2017
1 parent 09317c6 commit d296222
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@
*.iml
*.ipr
*.iws
crowdin.yml
gradle
gradlew
gradlew.bat
3 changes: 1 addition & 2 deletions src/main/java/com/crowdin/cli/commands/Commands.java
Original file line number Diff line number Diff line change
Expand Up @@ -1032,11 +1032,10 @@ public void run() {
for (String translation : translations) {
translation = translation.replaceAll("/+", "/");
if (!files.contains(translation)) {
//TODO: This usage is a bit unclear. Is the string supposed to be a regex or not?
if (translation.contains(Utils.PATH_SEPARATOR_REGEX)) {
translation = translation.replaceAll(Utils.PATH_SEPARATOR_REGEX + "+", "/");
} else if (translation.contains(Utils.PATH_SEPARATOR)) {
translation = translation.replaceAll(Utils.PATH_SEPARATOR_REGEX + Utils.PATH_SEPARATOR_REGEX, "/");
translation = translation.replaceAll(Utils.PATH_SEPARATOR + Utils.PATH_SEPARATOR, "/");
}
translation = translation.replaceAll("/+", "/");
files.add(translation);
Expand Down

0 comments on commit d296222

Please sign in to comment.