equal
deleted
inserted
replaced
142 // ----------------------------------------------------------------------------- |
142 // ----------------------------------------------------------------------------- |
143 string CATBase::GetPathOrFileName( bool bFileName, string sInput ) |
143 string CATBase::GetPathOrFileName( bool bFileName, string sInput ) |
144 { |
144 { |
145 LOG_LOW_FUNC_ENTRY("CATBase::GetPathOrFileName"); |
145 LOG_LOW_FUNC_ENTRY("CATBase::GetPathOrFileName"); |
146 string sRet; |
146 string sRet; |
147 size_t iPos = sInput.size()-1; |
147 size_t iPos = sInput.size(); |
148 |
148 |
149 sInput = ChangeSlashToBackSlash( sInput ); |
149 sInput = ChangeSlashToBackSlash( sInput ); |
150 |
150 |
151 //Find character '\' starting from end of string |
151 //Find character '\' starting from end of string |
152 while( iPos > 0 && sInput[iPos] != '\\' ) |
152 while( iPos > 0 && sInput[iPos-1] != '\\' ) |
153 { |
153 { |
154 iPos--; |
154 iPos--; |
155 } |
155 } |
156 if( iPos > 0 ) |
156 if( iPos > 0 ) |
157 { |
157 { |
158 //Return file name |
158 //Return file name |
159 if( bFileName ) |
159 if( bFileName ) |
160 { |
160 { |
161 sInput.erase( 0, iPos+1 ); |
161 sInput.erase( 0, iPos ); |
162 sRet = sInput; |
162 sRet = sInput; |
163 } |
163 } |
164 else //Return file path |
164 else //Return file path |
165 { |
165 { |
166 sInput.erase( iPos+1, string::npos ); |
166 sInput.erase( iPos, string::npos ); |
167 sRet = sInput; |
167 sRet = sInput; |
168 } |
168 } |
169 } |
169 } |
170 else |
170 else |
171 { |
171 { |
1055 out << sS60FilePath; |
1055 out << sS60FilePath; |
1056 out << "\" );\n"; |
1056 out << "\" );\n"; |
1057 |
1057 |
1058 // Hardcoded version number for support. |
1058 // Hardcoded version number for support. |
1059 out << "\n/* The AnalyzeTool version number used. */"; |
1059 out << "\n/* The AnalyzeTool version number used. */"; |
1060 out << "\n_LIT( KAtoolVersion, \"1.7.6;1.10.0\" );\n"; |
1060 out << "\n_LIT( KAtoolVersion, \"1.7.6;1.10.1\" );\n"; |
1061 |
1061 |
1062 out << "\nconst TFileName LogFileName()"; |
1062 out << "\nconst TFileName LogFileName()"; |
1063 out << "\n {"; |
1063 out << "\n {"; |
1064 out << "\n return TFileName( KFileName() );"; |
1064 out << "\n return TFileName( KFileName() );"; |
1065 out << "\n }"; |
1065 out << "\n }"; |