harvester/monitorplugins/fileplugin/src/fileeventhandlerao.cpp
changeset 25 8e4539ab1889
parent 21 50bf9db68373
child 40 910a23996aa0
child 45 a93990e5815e
child 54 a3cc46f37772
equal deleted inserted replaced
23:33ae025ac1e8 25:8e4539ab1889
   559     	}
   559     	}
   560     
   560     
   561     // check if not in mde, harvest
   561     // check if not in mde, harvest
   562     if ( !oldObject && !newObject )
   562     if ( !oldObject && !newObject )
   563         {
   563         {
   564         HBufC* fn = NULL;        
   564         HBufC* fn = NULL; 
   565 
   565     
   566         if (aNewUrl.Length() > 0)
   566         // ignore created file event if extension is not supported by any harverter plugin
   567         	{
   567         if( aNewUrl.Length() > 0 )
   568         	fn = aNewUrl.AllocLC();
   568             {
   569         	}
   569             if( iHarvesterPluginFactory->IsSupportedFileExtension( aNewUrl ) )
       
   570                 {
       
   571                 fn = aNewUrl.AllocLC();
       
   572                 }
       
   573             else
       
   574                 {
       
   575                 WRITELOG1( "CFileEventHandlerAO::ReplaceL - file extension not supported: %S", &aNewUrl );
       
   576                 return;           
       
   577                 }
       
   578             }
   570         else
   579         else
   571         	{
   580             {
   572         	fn = aOldUrl.AllocLC();
   581             if( iHarvesterPluginFactory->IsSupportedFileExtension( aOldUrl ) )
   573         	}
   582                 {
       
   583                 fn = aOldUrl.AllocLC();
       
   584                 }
       
   585             else
       
   586                 {
       
   587                 WRITELOG1( "CFileEventHandlerAO::ReplaceL - file extension not supported: %S", &aOldUrl );
       
   588                 return;           
       
   589                 }        
       
   590             }
       
   591 
   574         CHarvesterData* hd = CHarvesterData::NewL( fn );
   592         CHarvesterData* hd = CHarvesterData::NewL( fn );
   575         CleanupStack::Pop( fn );
   593         CleanupStack::Pop( fn );
   576         hd->SetEventType( EHarvesterAdd );
   594         hd->SetEventType( EHarvesterAdd );
   577         hd->SetOrigin( aOrigin );
   595         hd->SetOrigin( aOrigin );
   578         if( aFastHarvest )
   596         if( aFastHarvest )