Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -110,15 +110,17 @@ public static Map<String, String> scanGraphsDir(String graphsDirPath) {

public static String writeToFile(String dir, String graphName,
HugeConfig config) {
E.checkArgument(FileUtils.getFile(dir).exists(),
"The directory '%s' must exist", dir);
String fileName = Paths.get(dir, graphName + CONF_SUFFIX).toString();
File file = FileUtils.getFile(dir);
E.checkArgument(file.exists(),
"The directory '%s' must exist", dir);
String fileName = file.getPath() + File.separator + graphName + CONF_SUFFIX;
try {
config.save(new File(fileName));
File newFile = FileUtils.getFile(fileName);
config.save(newFile);
LOG.info("Write HugeConfig to file: '{}'", fileName);
} catch (ConfigurationException e) {
throw new HugeException("Failed to write HugeConfig to file '%s'",
e, fileName);
e, fileName);
}

return fileName;
Expand Down