Skip to content

Commit

Permalink
Fixed: When asking to open header file, Codelite ask's which one of t…
Browse files Browse the repository at this point in the history
…wo identical files, one with CAPITAL drive letter, one with lowercase drive letter

    fixes: #1280
  • Loading branch information
Eran Ifrah committed Jul 6, 2016
1 parent 0c2d416 commit 9be2b60
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions LiteEditor/context_cpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2718,10 +2718,19 @@ void ContextCpp::DoOpenWorkspaceFile()
wxString fileToOpen;
if(files2.size() > 1) {
wxArrayString choices;
wxStringSet_t uniqueFileSet;
for(size_t i = 0; i < files2.size(); i++) {
choices.Add(files2.at(i).GetFullPath());
wxString fullPath = files2.at(i).GetFullPath();
wxString fullPathLc = (wxGetOsVersion() & wxOS_WINDOWS) ? fullPath.Lower() : fullPath;

// Dont add duplicate entries.
// On Windows, we have a non case sensitive file system
if(uniqueFileSet.count(fullPathLc) == 0) {
uniqueFileSet.insert(fullPathLc);
choices.Add(fullPath);
}
}

fileToOpen = wxGetSingleChoice(_("Select file to open:"), _("Select file"), choices, &GetCtrl());
} else if(files2.size() == 1) {
fileToOpen = files2.at(0).GetFullPath();
Expand Down

0 comments on commit 9be2b60

Please sign in to comment.