testfws/stif/Logger/src/StifLogger.cpp
changeset 4 b8d1455fddc0
parent 2 73b88125830c
equal deleted inserted replaced
2:73b88125830c 4:b8d1455fddc0
   483                     // delete last '\'
   483                     // delete last '\'
   484                     newPath.Delete( 
   484                     newPath.Delete( 
   485                         ( aLoggerSettings.iHardwarePath.Length() -1 ), 1 );
   485                         ( aLoggerSettings.iHardwarePath.Length() -1 ), 1 );
   486                     }
   486                     }
   487                 }
   487                 }
   488             // Removes drive letter if given and appends implemented path 
   488             ret = aTestPath.LocateReverse(92);
   489             TParse parse;
   489                         // Is '\' character founded
   490             parse.Set( aTestPath, NULL, NULL );
   490                              
   491             // Path() return value starts with '\'
   491            if (ret != KErrNotFound)
   492             newPath.Append( parse.Path() );
   492                 {
   493             aTestPath = newPath;
   493                 // Is '\' last character
       
   494                 if (ret == (aTestPath.Length() - 1))
       
   495                      {
       
   496                      // delete last '\'
       
   497                      aTestPath.Delete((aTestPath.Length()- 1), 1);
       
   498                      }
       
   499                 }
       
   500              ret = aTestPath.LocateReverse('\\');
       
   501                
       
   502              //cut logger specyfic directory (like: \\Demomodule)
       
   503                            
       
   504              aTestPath = aTestPath.Right(aTestPath.Length()-ret);
       
   505                      
       
   506              // patch must end with '\'
       
   507              aTestPath.Append('\\');
       
   508                        
       
   509              // create path by combining path form .ini file with test module name
       
   510              newPath.Append(aTestPath);                                             
       
   511              aTestPath = newPath;
   494             }
   512             }
   495         if( aLoggerSettings.iIsDefined.iHwFormat )
   513         if( aLoggerSettings.iIsDefined.iHwFormat )
   496             {
   514             {
   497             aLoggerType = aLoggerSettings.iHardwareFormat;
   515             aLoggerType = aLoggerSettings.iHardwareFormat;
   498             // Remove file type if it is set
   516             // Remove file type if it is set
   527                     // delete last '\'
   545                     // delete last '\'
   528                     newPath.Delete( 
   546                     newPath.Delete( 
   529                         ( aLoggerSettings.iEmulatorPath.Length() -1 ), 1 );
   547                         ( aLoggerSettings.iEmulatorPath.Length() -1 ), 1 );
   530                     }
   548                     }
   531                 }
   549                 }
   532             // Removes drive letter if given and appends implemented path
   550             
   533             TParse parse;
   551                 ret = aTestPath.LocateReverse(92);
   534             parse.Set( aTestPath, NULL, NULL );
   552                         // Is '\' character founded
   535             // Path() return value starts with '\'
   553                              
   536             newPath.Append( parse.Path() );
   554                        if (ret != KErrNotFound)
       
   555                             {
       
   556                             // Is '\' last character
       
   557                             if (ret == (aTestPath.Length() - 1))
       
   558                                 {
       
   559                                 // delete last '\'
       
   560                                 aTestPath.Delete((aTestPath.Length()- 1), 1);
       
   561                                 }
       
   562                             }
       
   563             ret = aTestPath.LocateReverse('\\');
       
   564                        
       
   565             //cut logger specyfic directory (like: \\Demomodule)      
       
   566             aTestPath = aTestPath.Right(aTestPath.Length()-ret);                       
       
   567             // patch must end with '\'
       
   568             aTestPath.Append('\\'); 
       
   569                
       
   570             // create path by combining path form .ini file with test module name
       
   571             newPath.Append(aTestPath);                                                          
   537             aTestPath = newPath;
   572             aTestPath = newPath;
   538             }
   573             }
   539         if( aLoggerSettings.iIsDefined.iFormat )
   574         if( aLoggerSettings.iIsDefined.iFormat )
   540             {
   575             {
   541             aLoggerType = aLoggerSettings.iEmulatorFormat;
   576             aLoggerType = aLoggerSettings.iEmulatorFormat;