rem: if (nextFile.isDirectory()) { 
add:  var isDir = false; try { isDir = nextFile.isDirectory(); } catch (e) {   nextFile = { unicodeLeafName : nextFile.unicodeLeafName, fileSize : 0, lastModificationDate : 0, isHidden: function() { return false; } }; }  if (isDir) { 
context:   setDirectory: function(directory) {    this.mDirectoryPath = directory;    this.mFileList = [];    this.mDirList = [];    var dir = Components.classes[nsLocalFile_CONTRACTID].createInstance(nsILocalFile);    dir.followLinks = false;    dir.initWithUnicodePath(directory);    var dirEntries = dir.QueryInterface(nsIFile).directoryEntries;    var nextFile;    var fileobj;    //var time = new Date();    while (dirEntries.hasMoreElements()) {      nextFile = dirEntries.getNext().QueryInterface(nsIFile);      if (nextFile.isDirectory()) {        if (!nextFile.isHidden() || this.mShowHiddenFiles) {          fileobj = new Object();          fileobj.file = nextFile;          this.mDirList[this.mDirList.length] = fileobj;        }      } else if (!this.mDirectoryFilter) {        this.mFileList[this.mFileList.length] = nextFile;      }    }    //time = new Date() - time;    //dump("load time: " + time/1000 + " seconds\n");    this.mFilteredFiles = [];    if (this.mOutliner) {      var oldRows = this.mTotalRows;      this.mTotalRows = this.mDirList.length;      if (this.mDirList.length != oldRows) {        this.mOutliner.rowCountChanged(0, this.mDirList.length - oldRows);      }      this.mOutliner.invalidate();    }    //time = new Date();    this.filterFiles();    //time = new Date() - time;    //dump("filter time: " + time/1000 + " seconds\n");    //time = new Date();    this.sort(this.mSortType, this.mReverseSort);    //time = new Date() - time;    //dump("sort time: " + time/1000 + " seconds\n");  },
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/ebd646ec99583654b8b1189302ceada776830620/nsFileView.js/buggy/xpfe/components/filepicker/res/content/nsFileView.js