// Allow to compare items if left & right path refer to same directory
// (which means there is effectively two files involved). No need to check
// side flags. If files weren't on both sides, we'd have no DIFFITEMs.
- if (lstrcmpi(sLeftBasePath.c_str(), sMiddleBasePath.c_str()) == 0 && lstrcmpi(sLeftBasePath.c_str(), sRightBasePath.c_str()) == 0)
+ if (string_compare_nocase(sLeftBasePath, sMiddleBasePath) == 0 && string_compare_nocase(sLeftBasePath, sRightBasePath) == 0)
return true;
return false;
//
#include "StdAfx.h"
-#include <shlwapi.h> // PathFindFileName()
#include <Poco/StringTokenizer.h>
#include "Merge.h"
#include "HexMergeDoc.h"
// If we have temp context it means we are comparing archives
if (IsArchiveFolders())
{
- LPCTSTR name0 = PathFindFileName(path0.c_str());
- LPCTSTR name1 = PathFindFileName(path1.c_str());
- LPCTSTR name2 = (m_nDirs > 2) ? PathFindFileName(path2.c_str()) : NULL;
+ String name0 = paths_FindFileName(path0);
+ String name1 = paths_FindFileName(path1);
+ String name2 = (m_nDirs > 2) ? paths_FindFileName(path2) : _T("");
/* FIXME: for 3way diff*/
String::size_type cchLeftRoot = m_pTempPathContext->m_strRoot[0].length();
pathsParent[1] = m_pTempPathContext->m_strDisplayRoot[1];
if (!m_pCtxt->m_piFilterGlobal->includeFile(pathsParent[0].c_str(), pathsParent[1].c_str()))
return AllowUpwardDirectory::Never;
- if (lstrcmpi(name0, _T("ORIGINAL")) == 0 && lstrcmpi(name1, _T("ALTERED")) == 0)
+ if (string_compare_nocase(name0, _T("ORIGINAL")) == 0 && string_compare_nocase(name1, _T("ALTERED")) == 0)
{
pathsParent[0] = paths_GetParentPath(pathsParent[0]);
pathsParent[1] = paths_GetParentPath(pathsParent[1]);
}
- name0 = PathFindFileName(pathsParent[0].c_str());
- name1 = PathFindFileName(pathsParent[1].c_str());
- if (lstrcmpi(name0, name1) == 0)
+ name0 = paths_FindFileName(pathsParent[0]);
+ name1 = paths_FindFileName(pathsParent[1]);
+ if (string_compare_nocase(name0, name1) == 0)
{
pathsParent[0] = paths_GetParentPath(pathsParent[0]);
pathsParent[1] = paths_GetParentPath(pathsParent[1]);
{
String strPath = m_pCtxt->GetPath(index);
ApplyDisplayRoot(index, strPath);
- sDirName[index] = PathFindFileName(strPath.c_str());
+ sDirName[index] = paths_FindFileName(strPath);
}
if (m_nDirs < 3)
{