Jakob - 2005-07-21

Logged In: YES
user_id=1298949

Hi,
I am afraid I had a typo in my patch above.
The negations at the 'if' clauses are wrong.
The correct patch below. Sorry.

public static String searchFiles(String[] path, String
nameToSearch) {
String fileName = null;
for (int i = 0; i < path.length; i++) {

// Look for "mib.files" file
File file = new File(path[i] +
File.separator + MIB_FILES);
if (file.exists()) {
fileName = searchMibFiles(file,
nameToSearch);
if (correctFile(path[i], fileName, nameToSearch))
return fileName;
}

// If not found, look for a file with the
same name
file = new File(path[i] + File.separator +
nameToSearch);
if (file.exists()) {
fileName = file.getName();
if (correctFile(path[i], fileName, nameToSearch))
return fileName;
}

// If not found, look for a "similar" name
fileName = regexOnFiles(path[i], nameToSearch);
if (fileName != null) {
return fileName;
}
}

return fileName;
}