and also search by tth in adl search
entries that stay in search drop down menu after shut down and restart client
Currently have pwdc++ 0.41, reely happy with it keep all fetures
Posted 03 August 2006 - 10:40 PM
Posted 06 August 2006 - 09:55 PM
string ShareManager::translateFileName(const string& aFile, bool adc) throw(ShareException) {
RLock l(cs);
if(aFile == "MyList.DcLst") {
generateXmlList(); //new string: it copys from files.xml.bz2
return getBZXmlFile(); //new string: it copys from files.xml.bz2
//generateNmdcList(); //string comment
//return getListFile(); //string comment
} else if(aFile == "files.xml.bz2") {
generateXmlList();
return getBZXmlFile();
} else {
string file;
if(aFile.length() == 39 && Encoder::isBase32(aFile.c_str())){
TTHValue tth(aFile);
HashFileIter i = tthIndex.find(&tth);
if(i != tthIndex.end()) {
dcassert(i->second->getTTH() != NULL);
file = i->second->getParent()->getFullName() + i->second->getName();
}
}
else if(adc) {
// Check for tth root identifier
if(aFile.compare(0, 4, "TTH/") == 0) {
TTHValue v(aFile.substr(4));
HashFileIter i = tthIndex.find(&v);
if(i != tthIndex.end()) {
file = i->second->getADCPath();
} else {
throw ShareException("File Not Available");
}
} else if(aFile.compare(0, 1, "/") == 0) {
file = aFile;
} else {
throw ShareException("File Not Available");
}
// Remove initial '/'
file.erase(0, 1);
// Change to NMDC path separators
for(string::size_type i = 0; i < file.length(); ++i) {
if(file[i] == '/') {
file[i] = '\\';
}
}
// Ok, we now should have an nmdc equivalent name
} else {
file = aFile;
}
string::size_type i = file.find('\\');
if(i == string::npos)
throw ShareException("File Not Available");
string aDir = file.substr(0, i);
RLock l(cs);
StringPairIter j = lookupVirtual(aDir);
if(j == virtualMap.end()) {
throw ShareException("File Not Available");
}
file = file.substr(i + 1);
if(!checkFile(j->second, file)) {
throw ShareException("File Not Available");
}
return j->second + file;
}
}
Posted 07 August 2006 - 06:42 PM
Posted 15 August 2006 - 12:49 PM
Posted 15 August 2006 - 01:07 PM
Crise, on Jun 7 2006, 07:18 AM, said:
Posted 16 August 2006 - 03:14 PM
A_Alias, on Aug 15 2006, 04:07 PM, said:
Posted 16 August 2006 - 08:04 PM
Posted 17 August 2006 - 12:56 AM
adrian_007, on Aug 16 2006, 09:04 PM, said:
Posted 17 August 2006 - 02:01 AM
Posted 18 August 2006 - 01:55 PM
Posted 18 August 2006 - 01:58 PM
diabolik2186, on Aug 18 2006, 08:55 AM, said:
Posted 20 August 2006 - 07:35 AM
NadaWTB, on Aug 18 2006, 08:58 PM, said:
Posted 20 August 2006 - 08:31 AM
Goralf, on Aug 20 2006, 02:35 AM, said:
Posted 20 August 2006 - 10:41 AM
Posted 22 August 2006 - 03:25 AM
Posted 23 August 2006 - 07:58 PM
Posted 26 August 2006 - 04:55 PM
BamBam, on Aug 22 2006, 03:25 AM, said:
Posted 05 September 2006 - 09:47 PM
0 members, 0 guests, 0 anonymous users