rem: array[i] = dirContents.GetNext().QueryInterface(nsILocalFile); i++; 
add: var file = dirContents.GetNext().QueryInterface(nsILocalFile);  /* split up the current filter since there might be more than one thing in it */ try { /* always add directories */ if (file.isDirectory()) { array[i] = file; i++; } else { for (var k = 0; k < splitFilters.length; ++k) { var tmpStr = splitFilters[k]; /* split up in to an array */ var matchStr; if (tmpStr == "*.*") { matchStr = ".*"; } else { var tmpArray = tmpStr.match("\*\.(.*)"); var matchStr = ".*\\." + tmpArray[1] + "$"; } if (file.leafName.match(matchStr)) { array[i] = file; i++; break; } } } } catch(ex) { } 
context: function getDirectoryContents(parentElement, dirContents){  var i = 0;  var array = new Array();  while (dirContents.HasMoreElements()) {    array[i] = dirContents.GetNext().QueryInterface(nsILocalFile);    i++;  }  /* sort the array */  array.sort(dirSort);  createTree(parentElement, array);}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/3d5b171adfba55b9e60a06c4a8cb8266d6ff9423/filepicker.js/clean/xpfe/components/filepicker/res/content/filepicker.js