Ticket #3855 (closed: duplicate)

Opened 9 years ago

Last modified 5 years ago

Next or previous on a non-existent file causes an extra file extension in Muon Analysis

Reported by: Robert Whitley Owned by: Robert Whitley
Priority: minor Milestone: Release 2.1
Component: Mantid Keywords:
Cc: Blocked By:
Blocking: Tester: Nick Draper

Description

Go to muon analysis

Load a file from any directory that contains files that append. i.e MUSR0000001.nxs, MUSR0000002.nxs

Keep clicking next until you run out of files for example if MUSR0000003.nxs didn't exist.

When this happens it adds another file extension to the end and outputs the following message.

C:/someFile/MUSR0000003.nxs.nxs Specified file does not exist.

This is a problem because if it was just MUSR0000003.nxs that didn't exist but MUSR0000004.nxs did exist when the user clicked next it would try opening MUSR0000004.nxs.nxs which doesn't exist.

Change History

comment:1 Changed 9 years ago by Robert Whitley

Located the problem area in FileFinder.cpp

std::string FileFinderImpl::findRun(const std::string& hint,const std::vector<std::string> &exts)const
{
  ... (code)
  ...
      // Look first at the original filename then for case variations. This is important
      // on platforms where file names ARE case sensitive.
      std::vector<std::string> filenames(3,filename);
      std::transform(filename.begin(),filename.end(),filenames[1].begin(),toupper);
      std::transform(filename.begin(),filename.end(),filenames[2].begin(),tolower);
      std::vector<std::string>::const_iterator ext = extensions.begin();
      for (; ext != extensions.end(); ++ext)
      {
        for(size_t i = 0; i < filenames.size(); ++i)
        {
          std::string path = getFullPath(filenames[i] + *ext);
          if (!path.empty())
            return path;
        }
      }
  ...
  ... (code)
}


comment:2 Changed 9 years ago by Nick Draper

  • Milestone changed from Iteration 32 to Iteration 33

Moved to iteration 33 at iteration 32 code freeze

comment:3 Changed 9 years ago by Robert Whitley

  • Status changed from new to assigned
  • Owner changed from Anyone to Robert Whitley

comment:4 Changed 9 years ago by Robert Whitley

  • Status changed from assigned to accepted

comment:5 Changed 9 years ago by Robert Whitley

  • Status changed from accepted to verify
  • Resolution set to duplicate

This ticket has already been fixed. See #3986 for details.

comment:6 Changed 8 years ago by Nick Draper

  • Status changed from verify to verifying
  • Tester set to Nick Draper

duplicate verified

comment:7 Changed 8 years ago by Nick Draper

  • Status changed from verifying to closed

comment:8 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 4702

Note: See TracTickets for help on using tickets.