--- a/homescreenpluginsrv/hspspluginregistry/src/hspsdefinitionrepository.cpp Fri Mar 12 15:43:54 2010 +0200
+++ b/homescreenpluginsrv/hspspluginregistry/src/hspsdefinitionrepository.cpp Mon Mar 15 12:41:53 2010 +0200
@@ -20,6 +20,7 @@
#include <s32file.h>
#include <s32mem.h>
#include <sysutil.h>
+#include <bautils.h>
#include "hsps_builds_cfg.hrh"
@@ -638,8 +639,7 @@
}
CleanupStack::PopAndDestroy( fileName );
-
-
+
// Set drive information
iTempFileName1.Format( _L("%S"), &res->FileName() );
TParsePtr f( iTempFileName1 );
@@ -1048,19 +1048,22 @@
if ( !errorCode )
{
// Create the directory structure
- TInt err = iFs.MkDirAll( *iPath );
- if ( err != KErrNone && err != KErrAlreadyExists )
- {
- errorCode = err;
-
+ if( !BaflUtils::FolderExists( iFs, *iPath ) )
+ {
+ TInt err = iFs.MkDirAll( *iPath );
+ if ( err != KErrNone && err != KErrAlreadyExists )
+ {
+ errorCode = err;
+
#ifdef HSPS_LOG_ACTIVE
- if( iLogBus )
- {
- iLogBus->LogText( _L( "ChspsDefinitionRepository::WriteToFileL(): - error %d." ),
- err );
+ if( iLogBus )
+ {
+ iLogBus->LogText( _L( "ChspsDefinitionRepository::WriteToFileL(): - error %d." ),
+ err );
+ }
+#endif
}
-#endif
- }
+ }
if ( !errorCode )
{