Revision: 7465
http://winmerge.svn.sourceforge.net/winmerge/?rev=7465&view=rev
Author: gerundt
Date: 2010-12-07 19:29:29 +0000 (Tue, 07 Dec 2010)
Log Message:
-----------
BUG: [ 2890961 ] Creation of matching folder is wrong in recursive view mode
Modified Paths:
--------------
branches/R2_14/Docs/Users/ChangeLog.txt
branches/R2_14/Src/DirView.cpp
branches/R2_14/Src/DirView.h
Modified: branches/R2_14/Docs/Users/ChangeLog.txt
===================================================================
--- branches/R2_14/Docs/Users/ChangeLog.txt 2010-12-07 19:20:51 UTC (rev 7464)
+++ branches/R2_14/Docs/Users/ChangeLog.txt 2010-12-07 19:29:29 UTC (rev 7465)
@@ -24,6 +24,7 @@
Bugfix: Keeps verifing path even turned off in options (#3111581)
Bugfix: Crash after deleting text (#3109521)
Bugfix: Added EOL chars between copied file/path names (#2817546)
+ Bugfix: Created new matching folder to wrong folder (#2890961)
WinMerge 2.13.20 - 2010-10-20 (r7319)
Add missing keywords to Pascal highlighter (#2834192)
Modified: branches/R2_14/Src/DirView.cpp
===================================================================
--- branches/R2_14/Src/DirView.cpp 2010-12-07 19:20:51 UTC (rev 7464)
+++ branches/R2_14/Src/DirView.cpp 2010-12-07 19:29:29 UTC (rev 7465)
@@ -299,7 +299,7 @@
// Load the icons used for the list view (to reflect diff status)
// NOTE: these must be in the exactly the same order than in enum
// definition in begin of this file!
- VERIFY (m_imageList.Create(iconCX, iconCY, ILC_COLOR32 | ILC_MASK, 15, 1));
+ VERIFY(m_imageList.Create(iconCX, iconCY, ILC_COLOR32 | ILC_MASK, 15, 1));
VERIFY(-1 != m_imageList.Add(AfxGetApp()->LoadIcon(IDI_LFILE)));
VERIFY(-1 != m_imageList.Add(AfxGetApp()->LoadIcon(IDI_RFILE)));
VERIFY(-1 != m_imageList.Add(AfxGetApp()->LoadIcon(IDI_NOTEQUALFILE)));
@@ -1270,9 +1270,10 @@
* contents and don't necessarily need to copy whole folder structure.
* @param [in] di DIFFITEM for folder compare item.
* @param [in] side1 true if our unique folder item is side1 item.
+ * @param [out] newFolder New created folder (full folder path).
* @return true if user agreed and folder was created.
*/
-bool CDirView::CreateFoldersPair(DIFFITEM & di, bool side1)
+bool CDirView::CreateFoldersPair(DIFFITEM & di, bool side1, String &newFolder)
{
String subdir;
String basedir;
@@ -1282,6 +1283,7 @@
// right side base path (where to create)
subdir = di.left.filename;
basedir = GetDocument()->GetRightBasePath();
+ basedir = di.GetLeftFilepath(basedir);
}
else
{
@@ -1289,8 +1291,10 @@
// left side base path (where to create)
subdir = di.right.filename;
basedir = GetDocument()->GetLeftBasePath();
+ basedir = di.GetRightFilepath(basedir);
}
String createpath = paths_ConcatPath(basedir, subdir);
+ newFolder = createpath;
CString message;
LangFormatString1(message, IDS_CREATE_PAIR_FOLDER, createpath.c_str());
@@ -1345,7 +1349,7 @@
// Open left-only item to editor if its not a folder or binary
if (isDir)
{
- if (CreateFoldersPair(**di1, true))
+ if (CreateFoldersPair(**di1, true, path2))
{
return true;
}
@@ -1361,7 +1365,7 @@
// Open right-only item to editor if its not a folder or binary
if (isDir)
{
- if (CreateFoldersPair(**di1, false))
+ if (CreateFoldersPair(**di1, false, path1))
{
return true;
}
Modified: branches/R2_14/Src/DirView.h
===================================================================
--- branches/R2_14/Src/DirView.h 2010-12-07 19:20:51 UTC (rev 7464)
+++ branches/R2_14/Src/DirView.h 2010-12-07 19:29:29 UTC (rev 7465)
@@ -254,7 +254,7 @@
String &path1, String &path2, int & sel1, bool & isDir);
bool OpenTwoItems(UINT_PTR pos1, UINT_PTR pos2, DIFFITEM **di1, DIFFITEM **di2,
String &path1, String &path2, int & sel1, int & sel2, bool & isDir);
- bool CreateFoldersPair(DIFFITEM & di, bool side1);
+ bool CreateFoldersPair(DIFFITEM & di, bool side1, String &newFolder);
// Implementation data
protected:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|