Skip to content

Commit

Permalink
Log message if nameInCatalog has not been set. Refs #8537.
Browse files Browse the repository at this point in the history
  • Loading branch information
jawrainey committed Jan 15, 2014
1 parent ecd43ce commit b994c4c
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions Code/Mantid/Framework/ICat/src/CatalogPublish.cpp
Expand Up @@ -83,13 +83,19 @@ namespace Mantid
{
std::string fileName = Poco::Path(filePath).getFileName();
// If the user has not set the name to save the file as, then use the filename of the file being uploaded.
if (nameInCatalog.empty()) setProperty("NameInCatalog", fileName);
g_log.notice("NameInCatalog has not been set. Using filename instead: " + fileName + ".");
if (nameInCatalog.empty())
{
setProperty("NameInCatalog", fileName);
g_log.notice("NameInCatalog has not been set. Using filename instead: " + fileName + ".");
}
}
else // The user wants to upload a workspace.
{
if (nameInCatalog.empty()) setProperty("NameInCatalog", workspace->name());
g_log.notice("NameInCatalog has not been set. Using workspace name instead: " + workspace->name() + ".");
if (nameInCatalog.empty())
{
setProperty("NameInCatalog", workspace->name());
g_log.notice("NameInCatalog has not been set. Using workspace name instead: " + workspace->name() + ".");
}

// Save workspace to a .nxs file in the user's default directory.
saveWorkspaceToNexus(workspace);
Expand Down

0 comments on commit b994c4c

Please sign in to comment.