imbajin commented on code in PR #2019:
URL:
https://github.com/apache/incubator-hugegraph/pull/2019#discussion_r1026545125
##########
hugegraph-core/src/main/java/org/apache/hugegraph/util/ConfigUtil.java:
##########
@@ -112,9 +112,11 @@ public static Map<String, String> scanGraphsDir(String
graphsDirPath) {
public static String writeToFile(String dir, String graphName,
HugeConfig config) {
- E.checkArgument(FileUtils.getFile(dir).exists(),
+ File file = FileUtils.getFile(dir);
+ E.checkArgument(file.exists(),
"The directory '%s' must exist", dir);
- String fileName = Paths.get(dir, graphName + CONF_SUFFIX).toString();
+ String tmpGraphName = graphName + CONF_SUFFIX;
Review Comment:
> in our case, fileName is "graphName.properties ", has one dot
we could assert only one `.` could exist, and another way is we just
truncate before `.` then we add `.properties` as surffix later
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]