Skip to content

Commit

Permalink
Fix same file opened 2 times with different sensitive case of path re…
Browse files Browse the repository at this point in the history
  • Loading branch information
donho committed May 5, 2024
1 parent 2d076b6 commit 3609a21
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion PowerEditor/src/ScintillaComponent/Buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1795,7 +1795,7 @@ BufferID FileManager::getBufferFromName(const TCHAR* name)
{
for (auto buf : _buffers)
{
if (wcscmp(name, buf->getFullPathName()) == 0)
if (wcsicmp(name, buf->getFullPathName()) == 0)
{
if (!(buf->_referees.empty()) && buf->_referees[0]->isVisible())
{
Expand Down
2 changes: 1 addition & 1 deletion PowerEditor/src/ScintillaComponent/DocTabView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ BufferID DocTabView::findBufferByName(const TCHAR * fullfilename) //-1 if not fo
::SendMessage(_hSelf, TCM_GETITEM, i, reinterpret_cast<LPARAM>(&tie));
BufferID id = reinterpret_cast<BufferID>(tie.lParam);
Buffer * buf = MainFileManager.getBufferByID(id);
if (wcscmp(fullfilename, buf->getFullPathName()) == 0)
if (wcsicmp(fullfilename, buf->getFullPathName()) == 0)
{
return id;
}
Expand Down

0 comments on commit 3609a21

Please sign in to comment.