This commit is contained in:
Igor Pavlov
2016-05-20 00:00:00 +00:00
committed by Kornel Lesiński
parent 66ac98bb02
commit bec3b479dc
88 changed files with 972 additions and 753 deletions

View File

@@ -1067,10 +1067,7 @@ STDMETHODIMP CAgentFolder::BindToParentFolder(IFolderFolder **resultFolder)
if (parentIndex < 0)
proxyDirIndex = k_Proxy2_RootDirIndex;
else
{
const CProxyFile2 &file = _proxy2->Files[parentIndex];
proxyDirIndex = file.DirIndex;
}
proxyDirIndex = _proxy2->Files[parentIndex].DirIndex;
}
}
else

View File

@@ -34,10 +34,10 @@ int CProxyArc::FindSubDir(unsigned dirIndex, const wchar_t *name, unsigned &inse
return -1;
}
unsigned mid = (left + right) / 2;
unsigned dirIndex = subDirs[mid];
int compare = CompareFileNames(name, Dirs[dirIndex].Name);
unsigned dirIndex2 = subDirs[mid];
int compare = CompareFileNames(name, Dirs[dirIndex2].Name);
if (compare == 0)
return dirIndex;
return dirIndex2;
if (compare < 0)
right = mid;
else