umbraco/Umbraco-CMS — pull request #590 by 21robin12 (2014-12-11 18:08:00+00:00)
Title: Fixed bug U4-6004, MediaService.GetMediaByPath now returns IMedia for paths containing 'x' and '_'

Issue U4-6004 here: http://issues.umbraco.org/issue/U4-6004

MediaService.GetMediaByPath checks for paths containing both 'x' and '_', and strips the path at the last '_'. I guess this is so that the method returns the original image rather than the resized copy. However, if any other media is uploaded which contains these two characters, the method fails to retrieve that media.

The only changes I've made have been to this method, which now makes another sql call with the original path if the stripped-down path returns null.