To be honest it might be more readable without the early returns:

```
if (iPos != string::npos)
{
  CStdString options;
  if (strFilePath[iPos] == '|')
  {
    options = strFilePath.Mid(iPos);
    iPos = strFilePath.find_last_of("/\\", iPos);
  }
  if (iPos != string::npos)
    return strFilePath.Left(iPos + 1) + options;
}
return "";
```