Skip to content

Commit

Permalink
Merge pull request #3 from AlexandrouR/windowsPatch
Browse files Browse the repository at this point in the history
Escape dot
  • Loading branch information
antonydenyer authored Oct 5, 2019
2 parents f8fa643 + 20e5932 commit e2fe8ac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions src/main/java/org/web3j/console/project/ProjectCreator.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,8 @@ public class ProjectCreator {
.loadGradlewWrapperSettings("gradlew-wrapper.properties.template")
.loadGradleJar("gradle-wrapper.jar")
.loadSolidityGreeter("Greeter.sol")
.withPackageNameReplacement(
s -> s.replaceAll("<package_name>", packageName))
.withProjectNameReplacement(
s -> s.replaceAll("<project_name>", projectName))
.withPackageNameReplacement(s -> s.replace("<package_name>", packageName))
.withProjectNameReplacement(s -> s.replace("<project_name>", projectName))
.build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ private String generatePath(final String... a) {

private String formatPackageName(final String packageName) {
if (packageName.contains(".")) {
return packageName.replaceAll("[.]", File.separator);
return packageName.replace("\\.", File.separator);
}
return packageName;
}
Expand Down

0 comments on commit e2fe8ac

Please sign in to comment.