Skip to content

Commit c2dfa60

Browse files
authored
Merge pull request #23 from AlexandrouR/fixedDot
Fixed issue with passing . as a path
2 parents cff0b7e + 324f6aa commit c2dfa60

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/main/java/org/web3j/console/project/ProjectStructure.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,11 @@ private String generateRoot(final String path) {
7474
return System.getProperty("user.home");
7575
} else if (path.startsWith("~" + File.separator)) {
7676
return System.getProperty("user.home") + path.substring(1);
77+
} else if (path.equals(".")) {
78+
return System.getProperty("user.dir");
79+
} else if (path.startsWith(".")) {
80+
return System.getProperty("user.dir") + path.substring(1);
7781
}
78-
7982
return path;
8083
}
8184

0 commit comments

Comments
 (0)