Fix crash when trying to find a filename in an empty string