diff --git a/PowerEditor/src/WinControls/ReadDirectoryChanges/ReadDirectoryChangesPrivate.cpp b/PowerEditor/src/WinControls/ReadDirectoryChanges/ReadDirectoryChangesPrivate.cpp index f2d648a1..5f9cd4e5 100644 --- a/PowerEditor/src/WinControls/ReadDirectoryChanges/ReadDirectoryChangesPrivate.cpp +++ b/PowerEditor/src/WinControls/ReadDirectoryChanges/ReadDirectoryChangesPrivate.cpp @@ -149,7 +149,7 @@ void CReadChangesRequest::ProcessNotification() CStringW wstrFilename(fni.FileName, fni.FileNameLength/sizeof(wchar_t)); // 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; else wstrFilename = m_wstrDirectory + wstrFilename;