- Non-static class member mHGGetListTime is not initialized in this constructor
solution: add it into init list of constructor
- unsigned_compare: This greater-than-or-equal-to-zero comparison of an
unsigned value is always true. end >= 0UL.
Function: GetLastDirName
mPrimTime(0),
mLastTimestamp(0),
mThread(0),
+ mHGGetListTime(0),
mHGGetFileStatus(DND_FILE_TRANSFER_NOT_STARTED),
mBlockAdded(false),
mBlockCtrl(0),
utf::string
CopyPasteUIX11::GetLastDirName(const utf::string &str) // IN
{
- utf::string ret;
- size_t start;
- size_t end;
-
- end = str.bytes() - 1;
- if (end >= 0 && DIRSEPC == str[end]) {
- end--;
- }
-
- if (end <= 0 || str[0] != DIRSEPC) {
- return "";
- }
-
- start = end;
-
- while (str[start] != DIRSEPC) {
- start--;
- }
-
- return str.substr(start + 1, end - start);
+ char *baseName;
+ File_GetPathName(str.c_str(), NULL, &baseName);
+ utf::string s(baseName);
+ free(baseName);
+ return s;
}