Trying to fix avatar file name charset issue #44
This commit is contained in:
@@ -47,7 +47,7 @@ public:
|
||||
|
||||
bool Init(const std::string &dataDir, const std::string &cacheDir);
|
||||
|
||||
void AddSingleAvatar(const std::string &fileName);
|
||||
bool AddSingleAvatar(const std::string &fileName);
|
||||
|
||||
static boost::shared_ptr<AvatarFileState> OpenAvatarFileForChunkRead(const std::string &fileName, unsigned &outFileSize, AvatarFileType &outFileType);
|
||||
static unsigned ChunkReadAvatarFile(boost::shared_ptr<AvatarFileState> fileState, unsigned char *data, unsigned chunkSize);
|
||||
|
||||
@@ -98,9 +98,10 @@ AvatarManager::Init(const string &dataDir, const string &cacheDir)
|
||||
return retVal;
|
||||
}
|
||||
|
||||
void
|
||||
bool
|
||||
AvatarManager::AddSingleAvatar(const std::string &fileName)
|
||||
{
|
||||
bool retVal = false;
|
||||
path filePath(fileName);
|
||||
string tmpFileName(filePath.file_string());
|
||||
|
||||
@@ -120,9 +121,11 @@ AvatarManager::AddSingleAvatar(const std::string &fileName)
|
||||
{
|
||||
boost::mutex::scoped_lock lock(m_avatarsMutex);
|
||||
m_avatars.insert(AvatarMap::value_type(md5buf, tmpFileName));
|
||||
retVal = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
|
||||
boost::shared_ptr<AvatarFileState>
|
||||
|
||||
Reference in New Issue
Block a user