mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Revert "Merge branch 'singleFileClient'"
This reverts commit 1bf9ed770532f3093548fa4120209be3a31c5c21, reversing changes made to 5b0464d7a0aaa034851dfc80ca0a2d367f4c28ef. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1179 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
693cb93868
commit
22dea2ceea
@ -94,10 +94,6 @@ bool FileIndexMonitor::findLocalFile(std::string hash,
|
||||
}
|
||||
fullpath += fe->name;
|
||||
|
||||
size = fe->size;
|
||||
ok = true;
|
||||
} else {
|
||||
fullpath = fe->name;
|
||||
size = fe->size;
|
||||
ok = true;
|
||||
}
|
||||
@ -136,12 +132,6 @@ bool FileIndexMonitor::convertSharedFilePath(std::string path, std::string &f
|
||||
std::cerr << "FileIndexMonitor::convertSharedFilePath() Found Path: " << fullpath << std::endl;
|
||||
#endif
|
||||
ok = true;
|
||||
} else {
|
||||
fullpath = path;
|
||||
ok = true;
|
||||
#ifdef FIM_DEBUG
|
||||
std::cerr << "FileIndexMonitor::convertSharedFilePath() Found Path: " << fullpath << std::endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
} fiMutex.unlock(); /* UNLOCKED DIRS */
|
||||
|
@ -757,13 +757,6 @@ int FileIndex::loadIndex(std::string filename, std::string expectedHash, uint64_
|
||||
(it->second)->parent = root;
|
||||
}
|
||||
|
||||
std::map<std::string, FileEntry *>::iterator it2;
|
||||
for(it2 = root->files.begin();
|
||||
it2 != root->files.end(); it2++)
|
||||
{
|
||||
(it2->second)->parent = root;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
/* pop stack */
|
||||
|
@ -336,19 +336,7 @@ int FileIndexStore::RequestDirDetails(void *ref, DirDetails &details, uint32_t f
|
||||
else
|
||||
{
|
||||
/* NEW add path (to dir - if dir, or parent dir - if file? */
|
||||
if (NULL != (person = dynamic_cast<PersonEntry *>(parent))) {
|
||||
//if parent if root, then the path is inside the name; we should parse the name for the last / char
|
||||
int i;
|
||||
for(i = details.name.length(); (i > 0) && (details.name[i] != '/'); i--);
|
||||
if (i != 0) {
|
||||
//the file is in a subdir, let's remove the / char and set correct path
|
||||
details.path = details.name.substr(0,i);
|
||||
details.name = details.name.substr(i + 1);
|
||||
}
|
||||
|
||||
} else {
|
||||
details.path = parent->path;
|
||||
}
|
||||
|
||||
while(parent->parent)
|
||||
parent = parent->parent;
|
||||
|
Loading…
Reference in New Issue
Block a user