From cc125e64b3d6cc02411586229c4986bd5344dfdb Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 22 Mar 2014 22:03:34 +0000 Subject: [PATCH] Handle normalization of directory names correctly in wxFileHistory. Don't use relative path for the directories, which can also be managed by wxFileHistory, because they don't have any and the old code resulted in showing an empty string for them. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76179 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/filehistorycmn.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/filehistorycmn.cpp b/src/common/filehistorycmn.cpp index c27ed12c0f..176923d972 100644 --- a/src/common/filehistorycmn.cpp +++ b/src/common/filehistorycmn.cpp @@ -137,11 +137,11 @@ void wxFileHistoryBase::AddFileToHistory(const wxString& file) const wxFileName fnOld(m_fileHistory[i]); wxString pathInMenu; - if ( fnOld.GetPath() == fnNew.GetPath() ) + if ( (fnOld.GetPath() == fnNew.GetPath()) && fnOld.HasName() ) { pathInMenu = fnOld.GetFullName(); } - else // file in different directory + else // file in different directory or it's not a file but a directory { // absolute path; could also set relative path pathInMenu = m_fileHistory[i];