This is getting the substring after the _second_-last `/` in the path, if I'm correct? Perhaps add a comment to that effect? Or a short comment to describe the expected syntax of the path here, i.e. why it makes sense to get everything from the second-last '/' onward?