Fix "Folder as Workspace" not updating regression
This commit is contained in:
parent
6b3e562d6a
commit
000e447cb9
@ -87,7 +87,14 @@ DWORD WINAPI Notepad_plus::monitorFileOnChange(void * params)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
changes.Pop(dwAction, wstrFilename);
|
changes.Pop(dwAction, wstrFilename);
|
||||||
if (lstrcmp(fullFileName, wstrFilename.GetString()) == 0)
|
generic_string fn = wstrFilename.GetString();
|
||||||
|
|
||||||
|
// Fix monitoring files which are under root problem
|
||||||
|
size_t pos = fn.find(TEXT("\\\\"));
|
||||||
|
if (pos == 2)
|
||||||
|
fn.replace(pos, 2, TEXT("\\"));
|
||||||
|
|
||||||
|
if (lstrcmp(fullFileName, fn.c_str()) == 0)
|
||||||
{
|
{
|
||||||
if (dwAction == FILE_ACTION_MODIFIED)
|
if (dwAction == FILE_ACTION_MODIFIED)
|
||||||
{
|
{
|
||||||
|
@ -149,7 +149,7 @@ void CReadChangesRequest::ProcessNotification()
|
|||||||
|
|
||||||
CStringW wstrFilename(fni.FileName, fni.FileNameLength/sizeof(wchar_t));
|
CStringW wstrFilename(fni.FileName, fni.FileNameLength/sizeof(wchar_t));
|
||||||
// Handle a trailing backslash, such as for a root directory.
|
// Handle a trailing backslash, such as for a root directory.
|
||||||
if (m_wstrDirectory.Right(1) != L"\\")
|
if (wstrFilename.Right(1) != L"\\")
|
||||||
wstrFilename = m_wstrDirectory + L"\\" + wstrFilename;
|
wstrFilename = m_wstrDirectory + L"\\" + wstrFilename;
|
||||||
else
|
else
|
||||||
wstrFilename = m_wstrDirectory + wstrFilename;
|
wstrFilename = m_wstrDirectory + wstrFilename;
|
||||||
|
Loading…
Reference in New Issue
Block a user