contentstorage/casrv/cawidgetscanner/src/cawidgetdescription.cpp
changeset 124 e36b2f4799c0
parent 109 e0aa398e6810
--- a/contentstorage/casrv/cawidgetscanner/src/cawidgetdescription.cpp	Fri Sep 17 08:32:18 2010 +0300
+++ b/contentstorage/casrv/cawidgetscanner/src/cawidgetdescription.cpp	Mon Oct 04 00:38:31 2010 +0300
@@ -671,46 +671,45 @@
     if( iTranslationFileName.Length() )
         {
         RBuf translationFileName;
-        translationFileName.Create( iTranslationFileName.Length() + 1 );
         CleanupClosePushL( translationFileName );
+        translationFileName.CreateL( iTranslationFileName.Length() + 1 );
         translationFileName.Copy( iTranslationFileName );
         translationFileName.Append( KWidgetScannerUnderline );
-           
-        
+
         if( !HbTextResolverSymbian::Init( translationFileName, KLocalizationFilepathC ) )
-          {
-          if( !HbTextResolverSymbian::Init( translationFileName, KLocalizationFilepathZ ) )
-              {
-              // this should not be called too often 
-              TChar currentDriveLetter;
-              TDriveList driveList;
-              RFs fs;
-              User::LeaveIfError( fs.Connect() );
-              User::LeaveIfError( fs.DriveList( driveList ) );
+            {
+            if( !HbTextResolverSymbian::Init( translationFileName, KLocalizationFilepathZ ) )
+                {
+                // this should not be called too often 
+                TChar currentDriveLetter;
+                TDriveList driveList;
+                RFs fs;
+                User::LeaveIfError( fs.Connect() );
+                User::LeaveIfError( fs.DriveList( driveList ) );
+
+                RBuf path;
+                CleanupClosePushL( path );
+                path.CreateL( KLocalizationFilepath().Length() + 1 );
 
-              RBuf path;
-              path.Create( KLocalizationFilepath().Length() + 1 );
-              CleanupClosePushL( path );
-              
-              for( TInt driveNr=EDriveY; driveNr >= EDriveA; driveNr-- )
-                  {
-                  if( driveList[driveNr] )
-                      {
-                      User::LeaveIfError( fs.DriveToChar( driveNr,
-                              currentDriveLetter ) );
-                      path.Append( currentDriveLetter );
-                      path.Append( KLocalizationFilepath );
-                      if( HbTextResolverSymbian::Init( translationFileName, path ) )
-                          {
-                          break;
-                          }
-                      }
-                  path.Zero();
-                  }
-              CleanupStack::PopAndDestroy( &path );
-              fs.Close();
-              }
-           }
+                for( TInt driveNr=EDriveY; driveNr >= EDriveA; driveNr-- )
+                    {
+                    if( driveList[driveNr] )
+                        {
+                        User::LeaveIfError( fs.DriveToChar( driveNr,
+                            currentDriveLetter ) );
+                        path.Append( currentDriveLetter );
+                        path.Append( KLocalizationFilepath );
+                        if( HbTextResolverSymbian::Init( translationFileName, path ) )
+                            {
+                            break;
+                            }
+                        }
+                    path.Zero();
+                    }
+                CleanupStack::PopAndDestroy( &path );
+                fs.Close();
+                }
+            }
         
         HBufC* tmp;