=== modified file 'dcpp/HashManager.cpp' --- dcpp/HashManager.cpp 2008-07-22 09:52:14 +0000 +++ dcpp/HashManager.cpp 2008-12-27 21:50:23 +0000 @@ -93,8 +93,13 @@ void HashManager::HashStore::addFile(const string& aFileName, uint32_t aTimeStamp, const TigerTree& tth, bool aUsed) { addTree(tth); +#ifdef _WIN32 string fname = Text::toLower(Util::getFileName(aFileName)); string fpath = Text::toLower(Util::getFilePath(aFileName)); +#else + string fname = Util::getFileName(aFileName); + string fpath = Util::getFilePath(aFileName); +#endif FileInfoList& fileList = fileIndex[fpath]; @@ -182,8 +187,13 @@ } bool HashManager::HashStore::checkTTH(const string& aFileName, int64_t aSize, uint32_t aTimeStamp) { +#ifdef _WIN32 string fname = Text::toLower(Util::getFileName(aFileName)); string fpath = Text::toLower(Util::getFilePath(aFileName)); +#else + string fname = Util::getFileName(aFileName); + string fpath = Util::getFilePath(aFileName); +#endif DirIter i = fileIndex.find(fpath); if (i != fileIndex.end()) { FileInfoIter j = find(i->second.begin(), i->second.end(), fname); @@ -202,8 +212,13 @@ } const TTHValue* HashManager::HashStore::getTTH(const string& aFileName) { +#ifdef _WIN32 string fname = Text::toLower(Util::getFileName(aFileName)); string fpath = Text::toLower(Util::getFilePath(aFileName)); +#else + string fname = Util::getFileName(aFileName); + string fpath = Util::getFilePath(aFileName); +#endif DirIter i = fileIndex.find(fpath); if (i != fileIndex.end()) { @@ -404,8 +419,13 @@ const string& root = getAttrib(attribs, sRoot, 2); if (!file.empty() && size >= 0 && timeStamp > 0 && !root.empty()) { + #ifdef _WIN32 string fname = Text::toLower(Util::getFileName(file)); string fpath = Text::toLower(Util::getFilePath(file)); + #else + string fname = Util::getFileName(aFileName); + string fpath = Util::getFilePath(aFileName); + #endif store.fileIndex[fpath].push_back(HashManager::HashStore::FileInfo(fname, TTHValue(root), timeStamp, false)); === modified file 'dcpp/ShareManager.cpp' --- dcpp/ShareManager.cpp 2008-08-24 14:27:43 +0000 +++ dcpp/ShareManager.cpp 2008-12-27 21:54:12 +0000 @@ -772,7 +772,11 @@ } void ShareManager::updateIndices(Directory& dir) { +#ifdef _WIN32 bloom.add(Text::toLower(dir.getName())); +#else + bloom.add(dir.getName()); +#endif for(Directory::MapIter i = dir.directories.begin(); i != dir.directories.end(); ++i) { updateIndices(*i->second); @@ -812,7 +816,11 @@ dir.addType(getType(f.getName())); tthIndex.insert(make_pair(f.getTTH(), i)); +#ifdef _WIN32 bloom.add(Text::toLower(f.getName())); +#else + bloom.add(f.getName()); +#endif } void ShareManager::refresh(bool dirs /* = false */, bool aUpdate /* = true */, bool block /* = false */) throw() {