void-packages/srcpkgs/codeblocks/patches/correct-file-access.patch

30 lines
1.4 KiB
Diff

--- a/src/plugins/contrib/FileManager/FileExplorer.cpp
+++ b/src/plugins/contrib/FileManager/FileExplorer.cpp
@@ -812,7 +812,7 @@ void FileExplorer::WriteConfig()
wxString ref=wxString::Format(_T("FileExplorer/RootList/I%i"),i);
cfg->Write(ref, m_Loc->GetString(m_favdirs.GetCount()+i));
}
- count=static_cast<int>(m_Loc->GetCount());
+ count=static_cast<int>(m_WildCards->GetCount());
cfg->Write(_T("FileExplorer/WildMask/Len"), count);
for(int i=0;i<count;i++)
{
--- a/src/plugins/contrib/FileManager/FileExplorerUpdater.cpp
+++ b/src/plugins/contrib/FileManager/FileExplorerUpdater.cpp
@@ -150,7 +150,14 @@ void FileExplorerUpdater::Update(const w
m_path=wxString(m_fe->GetFullPath(ti).c_str());
m_wildcard=wxString(m_fe->m_WildCards->GetValue().c_str());
m_vcs_type=wxString(m_fe->m_VCS_Type->GetLabel().c_str());
- m_vcs_commit_string=wxString(m_fe->m_VCS_Control->GetString(m_fe->m_VCS_Control->GetSelection()).c_str());
+ if (m_fe->m_VCS_Control->GetSelection() == wxNOT_FOUND)
+ {
+ m_vcs_commit_string = "";
+ }
+ else
+ {
+ m_vcs_commit_string=wxString(m_fe->m_VCS_Control->GetString(m_fe->m_VCS_Control->GetSelection()).c_str());
+ }
m_vcs_changes_only = m_fe->m_VCS_ChangesOnly->IsChecked();
if (m_vcs_type != wxEmptyString)
m_repo_path=wxString(m_fe->GetRootFolder().c_str());