Please no superfluous `else` after a conditional return.

Also our coding standard allows removing the `{` and `}` when there is only one line so please use that to make it a little shorter:
```
if (path2.empty())
    return path1;

if (path1.empty())
    return path2;
...
```