diff --git a/dll/win32/shell32/shelldesktop/CDirectoryWatcher.cpp b/dll/win32/shell32/shelldesktop/CDirectoryWatcher.cpp index 1e4a7015287..d5056a64faa 100644 --- a/dll/win32/shell32/shelldesktop/CDirectoryWatcher.cpp +++ b/dll/win32/shell32/shelldesktop/CDirectoryWatcher.cpp @@ -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