if (results != null && results.size() > 1) {
s_logger.warn("Multiple files with name " + fileName + " exists in datastore " + datastorePath + ". Trying to choose first file found in search attempt.");
} else if (results == null) {
String msg = "No file found with name " + fileName + " found in datastore " + datastorePath;
s_logger.error(msg);
throw new CloudException(msg);
}
for (HostDatastoreBrowserSearchResults result : results) {
List<FileInfo> info = result.getFile();
if (info != null && info.size() > 0) {
for (FileInfo fi : info) {