rem: if( result.indexOf( "BEGIN:VCALENDAR" ) == -1 ) 
add: else if( result.indexOf( "BEGIN:VCALENDAR" ) == -1 ) 
context:       onStreamComplete: function(loader, ctxt, status, resultLength, result)      {         window.setCursor( "default" );         var retval = false;         result = String.fromCharCode.apply(this, result);         //check to make sure its actually a calendar file, if not return.         if( result.indexOf( "BEGIN:VCALENDAR" ) == -1 )         {            alert( "This doesn't appear to be a valid file. Here's what I got back from\n"+Channel.URI.spec+":\nResult:"+result );         } else {             onResponse( result );             retval = true;         }         if( gNextSubNodeToRefresh )            gCalendarWindow.calendarManager.refreshAllRemoteCalendars();         return retval;      }
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/4c45ef82548cb211397be177fd26e5a4234bc45c/calendarManager.js/buggy/calendar/resources/content/calendarManager.js