Ticket #11395 (closed: fixed)
File finder should have option to only find files
Reported by: | Alex Buts | Owned by: | Martyn Gigg |
---|---|---|---|
Priority: | critical | Milestone: | Release 3.4 |
Component: | Framework | Keywords: | |
Cc: | martyn.gigg@… | Blocked By: | |
Blocking: | Tester: | Federico Montesino Pouzols |
Description (last modified by Martyn Gigg) (diff)
A bug was discovered in the LoadMask algorithm whereby if the datasearch.directories contains a directory named the same as an instrument name, the finder will find the directory and not a file.
Example: A path in the search directories could be c:\data\MERLIN. If you then try to run
LoadMask('MERLIN', InputFile='BjornMask.msk')
it will always fails to find the instrument file as it tries to use the directory as a file.
Change History
comment:1 Changed 6 years ago by Martyn Gigg
- Status changed from new to assigned
- Owner set to Martyn Gigg
comment:2 Changed 6 years ago by Martyn Gigg
- Description modified (diff)
- Summary changed from File finder should return file rather then folder when looking for a (file) name to File finder should have option to only find files
comment:4 Changed 6 years ago by Martyn Gigg
Option to ignore directories in FileFinder
Added tests to cover the behaviour. Refs #11395
Changeset: 6ed38238d02e0d5208a99cd41cbe5a1ca1a5282e
comment:5 Changed 6 years ago by Martyn Gigg
- Status changed from assigned to inprogress
Update the Python export for FileFinder::getFullPath
Refs #11395
Changeset: 09bab26a90a373bba67c53e174dedd4efc3a6a68
comment:6 Changed 6 years ago by Martyn Gigg
- Status changed from inprogress to verify
- Resolution set to fixed
This is being verified as pull request #435.
comment:7 Changed 6 years ago by Martyn Gigg
Fix conditional logic for Windows only code section.
Refs #11395
Changeset: 3cea0c159d959244b3f2e671df1ea6c423fe6e11
comment:8 Changed 6 years ago by Federico Montesino Pouzols
- Status changed from verify to verifying
- Tester set to Federico Montesino Pouzols
comment:9 Changed 6 years ago by Federico Montesino Pouzols
It worked well for me. I tried to fool it with LET and MAR without any success.
I only noticed a couple of unrelated nitpicky issues with LoadMask:
- It can be slowish for what it does (with LET and LET_hard, I guess that the problem is the large number of histograms),
- If you try to LoadMask with a wrong combination as for example in LoadMask('MAR', 'LET_hard.msk') you'll get a cryptic error message RuntimeError: Logic error.
comment:10 Changed 6 years ago by Federico Montesino Pouzols
- Status changed from verifying to closed
Merge pull request #435 from mantidproject/11395_filefinder_ignore_dirs_opt
Add option to FileFinder::getFullPath to skip directories
Full changeset: 2c900384de7d91d34d11241468bf8765bfb6e343
comment:11 Changed 6 years ago by Martyn Gigg
Those are fair points. Could you raise a ticket about them? This fix was primarily about fixing some functionality that had been broken in the last release.
comment:12 Changed 6 years ago by Federico Montesino Pouzols
Sure, there is now a trac ticket for those couple of issues: #11420(http://trac.mantidproject.org/mantid/ticket/11420).
comment:13 Changed 6 years ago by Martyn Gigg
Thanks
comment:14 Changed 5 years ago by Nick Draper
Somehow these slipped through without a resolution. Set to Fixed.
comment:15 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 12234