MappingData mappingData) {
int lastSlash = -1;
int length = -1;
CBuffer tmp = mappingData.tmpPrefix;
tmp.wrap(path, 0, path.length());
int pos = find(wrappers, tmp);
if (pos != -1) {
boolean found = false;
while (pos >= 0) {
if (tmp.startsWith(wrappers[pos].name)) {
length = wrappers[pos].name.length();
if (tmp.length() == length) {
found = true;
break;
} else if (tmp.startsWithIgnoreCase("/", length)) {
found = true;
break;
}
}
if (lastSlash == -1) {
lastSlash = tmp.nthSlash(nesting + 1);
} else {
lastSlash = tmp.lastIndexOf('/');
}
tmp.delete(lastSlash);
pos = find(wrappers, tmp);
}
if (found) {
mappingData.wrapperPath.set(wrappers[pos].name);