// Add to config if it's not already in there
if (!folderExists) {
logger.log(Level.INFO, "Adding folder to daemon config: " + localDirPath + ", and saving config at " + daemonConfigFile);
daemonConfigTO.getFolders().add(new FolderTO(localDirPath));
daemonConfigTO.save(daemonConfigFile);
return true;
}
else {
return false;
}
}
else {
FolderTO localDirFolderTO = new FolderTO(localDir.getAbsolutePath());
createAndWriteDaemonConfig(daemonConfigFile, Arrays.asList(new FolderTO[] { localDirFolderTO }));
return true;
}
}