}
} else {
try {
List<JarEntry> dirp = new ArrayList<JarEntry>();
for(Enumeration<JarEntry> eje = jf.entries(); eje.hasMoreElements(); ) {
JarEntry je = eje.nextElement();
String name = je.getName();
int ix = name.indexOf('/', jar.length());
if((!name.startsWith("META-INF") && (ix == -1 || ix == name.length()-1))) {
if("/".equals(jar) || (name.startsWith(jar) && name.length()>jar.length())) {
dirp.add(je);
}
}
}
for(JarEntry je : dirp) {
byte[] bs = getBytesInUTF8(je.getName());
int len = bs.length;
if(je.isDirectory()) {
len--;
}
if(recursive) {
if(fnmatch(STAR,0,1,bs,0,len,flags) != 0) {
continue;
}
buf.length(0);
buf.append(base, 0, base.length - jar.length());
buf.append( BASE(base) ? SLASH : EMPTY );
buf.append(bs, 0, len);
if(je.isDirectory()) {
int t = buf.realSize;
buf.append(SLASH);
buf.append(DOUBLE_STAR);
buf.append(bytes, m, end - m);
status = glob_helper(cwd, buf.bytes, buf.begin, buf.realSize, t, flags, func, arg);