Index: dll/win32/browseui/travellog.cpp =================================================================== --- dll/win32/browseui/travellog.cpp (revision 71111) +++ dll/win32/browseui/travellog.cpp (working copy) @@ -381,6 +381,9 @@ { CTravelEntry *destinationEntry; HRESULT hResult; + wchar_t destinationString[MAX_PATH]; + LPITEMIDLIST destinationItemId; + DWORD attrib; TRACE("CTravelLog::Travel for IUnknown punk=%p at offset=%d\n", punk, iOffset); @@ -387,6 +390,27 @@ hResult = FindRelativeEntry(iOffset, &destinationEntry); if (FAILED_UNEXPECTEDLY(hResult)) return hResult; + + // check whether destination directory exists + hResult = destinationEntry->GetPidl(&destinationItemId); + if (FAILED_UNEXPECTEDLY(hResult)) + return hResult; + SHGetPathFromIDListW(destinationItemId, destinationString); + TRACE("CTravelLog::Travel path:%s\n", debugstr_w(destinationString)); + attrib = GetFileAttributes(destinationString); + if (attrib == INVALID_FILE_ATTRIBUTES) + { + CComPtr oleWindow; + HWND window = NULL; + /* TODO: Make localizable */ + LPCWSTR pErrStr = L"Error: Directory was renamed or deleted"; + hResult = punk->QueryInterface(IID_PPV_ARG(IOleWindow, &oleWindow)); + if (SUCCEEDED(hResult)) + oleWindow->GetWindow(&window); + MessageBoxExW(window, pErrStr, destinationString, MB_OK, 0); + return E_FAIL; + } + fCurrentEntry = destinationEntry; hResult = destinationEntry->Invoke(punk); if (FAILED_UNEXPECTEDLY(hResult))