[SHELL32] Fix assertion failure in CDirectoryWatcher.cpp

CORE-17511
This commit is contained in:
Katayama Hirofumi MZ 2021-03-19 08:30:10 +09:00
parent c59ab8fce1
commit 880252fd46

View file

@ -162,8 +162,11 @@ void CDirectoryWatcher::ProcessNotification()
// convert to long pathname if it contains '~'
if (StrChrW(szPath, L'~') != NULL)
{
GetLongPathNameW(szPath, szName, _countof(szName));
lstrcpynW(szPath, szName, _countof(szPath));
if (GetLongPathNameW(szPath, szName, _countof(szName)) &&
!PathIsRelativeW(szName))
{
lstrcpynW(szPath, szName, _countof(szPath));
}
}
// convert action to event