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
This commit is contained in:
@@ -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];
|
||||
|
Reference in New Issue
Block a user