// Files are not binaries, but they are identical
if (identical != IDENTLEVEL_NONE)
{
- if (!m_filePaths.GetLeft().empty() && !m_filePaths.GetMiddle().empty() && !m_filePaths.GetRight().empty() &&
- m_filePaths.GetLeft() == m_filePaths.GetRight() && m_filePaths.GetMiddle() == m_filePaths.GetRight())
- {
- // compare file to itself, a custom message so user may hide the message in this case only
- s = _("The same file is opened in both panels.");
- ShowMessageBox(s, MB_ICONINFORMATION | MB_DONT_DISPLAY_AGAIN, IDS_FILE_TO_ITSELF);
- }
- else if (identical == IDENTLEVEL_ALL)
+ if (theApp.m_bExitIfNoDiff != MergeCmdLineInfo::ExitQuiet)
{
UINT nFlags = MB_ICONINFORMATION | MB_DONT_DISPLAY_AGAIN;
// of the "exit no diff".
nFlags &= ~MB_DONT_DISPLAY_AGAIN;
}
-
- if (theApp.m_bExitIfNoDiff != MergeCmdLineInfo::ExitQuiet)
+ if ((m_nBuffers == 2 && !m_filePaths.GetLeft().empty() && !m_filePaths.GetRight().empty() &&
+ strutils::compare_nocase(m_filePaths.GetLeft(), m_filePaths.GetRight())) == 0 ||
+ (m_nBuffers == 3 && !m_filePaths.GetLeft().empty() && !m_filePaths.GetMiddle().empty() && !m_filePaths.GetRight().empty() &&
+ strutils::compare_nocase(m_filePaths.GetLeft(), m_filePaths.GetRight()) == 0 ||
+ strutils::compare_nocase(m_filePaths.GetMiddle(), m_filePaths.GetRight()) == 0 ||
+ strutils::compare_nocase(m_filePaths.GetLeft(), m_filePaths.GetMiddle()) == 0))
+ {
+ // compare file to itself, a custom message so user may hide the message in this case only
+ s = _("The same file is opened in both panels.");
+ ShowMessageBox(s, nFlags, IDS_FILE_TO_ITSELF);
+ }
+ else if (identical == IDENTLEVEL_ALL)
{
s = _("The selected files are identical.");
ShowMessageBox(s, nFlags, IDS_FILESSAME);
}
+ }
+ if (identical == IDENTLEVEL_ALL)
+ {
// Exit application if files are identical.
if (theApp.m_bExitIfNoDiff == MergeCmdLineInfo::Exit ||
theApp.m_bExitIfNoDiff == MergeCmdLineInfo::ExitQuiet)