if (file.isDirectory()) {
log("Adding new folder to repository: " + file.getAbsolutePath(),
Project.MSG_INFO);
Folder newFolder = new Folder(parentFolder);
newFolder.setName(file.getName());
newFolder.update();
// now visit this new folder to take care of adding any files
// or subfolders within it.
if (isRecursive()) {
visit(newFolder, file);