Changeset 477 in dev for trunk/ab5.0/jenga/src/common/Path.cpp
- Timestamp:
- Apr 6, 2008, 8:07:40 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/jenga/src/common/Path.cpp
r467 r477 50 50 } 51 51 52 i3=(int)baseDirPath.size();i4=0; 52 std::string tempBaseDirPath = baseDirPath; 53 if( tempBaseDirPath[tempBaseDirPath.size()-1] != '\\' ) 54 { 55 tempBaseDirPath += "\\"; 56 } 57 58 i3=(int)tempBaseDirPath.size();i4=0; 53 59 while(i4<i2){ 54 60 for(i3--;;i3--){ 55 if( baseDirPath[i3-1]=='\\'){61 if(tempBaseDirPath[i3-1]=='\\'){ 56 62 i4++; 57 63 break; … … 59 65 } 60 66 } 61 memcpy(temporary, baseDirPath.c_str(),i3);67 memcpy(temporary,tempBaseDirPath.c_str(),i3); 62 68 temporary[i3]=0; 63 69 lstrcat(temporary,resultPath+i); 64 70 lstrcpy(resultPath,temporary); 65 71 72 if( resultPath[lstrlen(resultPath)-1] == '\\' ) 73 { 74 resultPath[lstrlen(resultPath)-1] = 0; 75 } 76 66 77 return resultPath; 67 78 }
Note:
See TracChangeset
for help on using the changeset viewer.