// till the first slash.
//
int firstSlash = s.indexOf('/');
if (firstSlash > 0) {
ByteString prefix = s.substring(0, firstSlash);
ByteString[] elems = prefix.split('.');
for (int i = elems.length - 1; i >= 0; i--) {
bb.append(fixName(elems[i]));
bb.append('.');
}