Fix git issue with file separators

In some cases, GetPath will not return the trailing `/` leading to
inability to commit any files in git
This commit is contained in:
Seth Hillbrand 2025-02-18 09:59:28 -08:00
parent 276029ee03
commit f6c507bff9

View File

@ -2246,7 +2246,10 @@ void PROJECT_TREE_PANE::onGitCommit( wxCommandEvent& aEvent )
} }
// Do not commit files outside the project directory // Do not commit files outside the project directory
if( !fn.GetPath().StartsWith( Prj().GetProjectPath() ) ) wxString projectPath = Prj().GetProjectPath();
wxString fileName = fn.GetFullPath();
if( !fileName.StartsWith( projectPath ) )
continue; continue;
// Skip lock files // Skip lock files