Like for the Diffusion image mime type, where both ".hdwi" and ".dwi" are registered file endings, however the
std::string CustomMimeType::ParsePathForExtension(...) returns the ".dwi" extension and not the ".hdwi". This happens because of the string comparison is based on substring matching without the "." at the beginning. Hence while iterating over the extensions (with iter), the
FindCaseInsensitive cmp(*iter);
function retuns a 'hit' already for *iter = "dwi"
Fix proposal:
Use
FindCaseInsensitive cmp("."+*iter);
instead. See attached patch.