- Based on Edijus patch (terminedijsatyahoodotcom)
See issue #6571 for more details.
svn path=/trunk/; revision=54176
INT_PTR res;
CComPtr<IDataObject> pDataObj;
HRESULT hResult;
+ DWORD wLength;
TRACE("SH_ShowPropertiesDialog entered filename %s\n", debugstr_w(lpf));
wcscpy(wFileName, lpf);
}
+ //
+ // get length
+ //
+ wLength = wcslen(wFileName);
+ if (wFileName[wLength-1] == L'\\' && wLength > 3)
+ {
+ //
+ // remove trailing \\ at the end of path
+ //
+ wFileName[wLength-1] = L'\0';
+ }
+
if (PathIsDirectoryW(wFileName))
{
return SH_ShowFolderProperties(wFileName, pidlFolder, apidl);
ShellExecuteW(lpcmi->hwnd, L"open", L"rundll32.exe shell32.dll,Control_RunDLL sysdm.cpl", NULL, NULL, SW_SHOWNORMAL);
return S_OK;
}
- else if (dcm.cidl == 0 && _ILIsDesktop(dcm.pidlFolder))
+ else if (dcm.cidl == 0 && dcm.pidlFolder != NULL && _ILIsDesktop(dcm.pidlFolder))
{
ShellExecuteW(lpcmi->hwnd, L"open", L"rundll32.exe shell32.dll,Control_RunDLL desk.cpl", NULL, NULL, SW_SHOWNORMAL);
return S_OK;