--- a/harvester/monitorplugins/fileplugin/src/fileeventhandlerao.cpp Tue Apr 27 17:05:23 2010 +0300
+++ b/harvester/monitorplugins/fileplugin/src/fileeventhandlerao.cpp Tue May 11 16:36:55 2010 +0300
@@ -561,16 +561,34 @@
// check if not in mde, harvest
if ( !oldObject && !newObject )
{
- HBufC* fn = NULL;
+ HBufC* fn = NULL;
+
+ // ignore created file event if extension is not supported by any harverter plugin
+ if( aNewUrl.Length() > 0 )
+ {
+ if( iHarvesterPluginFactory->IsSupportedFileExtension( aNewUrl ) )
+ {
+ fn = aNewUrl.AllocLC();
+ }
+ else
+ {
+ WRITELOG1( "CFileEventHandlerAO::ReplaceL - file extension not supported: %S", &aNewUrl );
+ return;
+ }
+ }
+ else
+ {
+ if( iHarvesterPluginFactory->IsSupportedFileExtension( aOldUrl ) )
+ {
+ fn = aOldUrl.AllocLC();
+ }
+ else
+ {
+ WRITELOG1( "CFileEventHandlerAO::ReplaceL - file extension not supported: %S", &aOldUrl );
+ return;
+ }
+ }
- if (aNewUrl.Length() > 0)
- {
- fn = aNewUrl.AllocLC();
- }
- else
- {
- fn = aOldUrl.AllocLC();
- }
CHarvesterData* hd = CHarvesterData::NewL( fn );
CleanupStack::Pop( fn );
hd->SetEventType( EHarvesterAdd );