Author: janderwald Date: Mon Oct 17 13:22:20 2011 New Revision: 54176
URL: http://svn.reactos.org/svn/reactos?rev=54176&view=rev Log: - Fix launching of properties dialog in the detail view - Based on Edijus patch (terminedijsatyahoodotcom) See issue #6571 for more details.
Modified: trunk/reactos/dll/win32/shell32/fprop.cpp trunk/reactos/dll/win32/shell32/shv_def_cmenu.cpp
Modified: trunk/reactos/dll/win32/shell32/fprop.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/fprop.cpp... ============================================================================== --- trunk/reactos/dll/win32/shell32/fprop.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/fprop.cpp [iso-8859-1] Mon Oct 17 13:22:20 2011 @@ -846,6 +846,7 @@ INT_PTR res; CComPtr<IDataObject> pDataObj; HRESULT hResult; + DWORD wLength;
TRACE("SH_ShowPropertiesDialog entered filename %s\n", debugstr_w(lpf));
@@ -871,6 +872,18 @@ else { 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))
Modified: trunk/reactos/dll/win32/shell32/shv_def_cmenu.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shv_def_c... ============================================================================== --- trunk/reactos/dll/win32/shell32/shv_def_cmenu.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/shv_def_cmenu.cpp [iso-8859-1] Mon Oct 17 13:22:20 2011 @@ -1435,7 +1435,7 @@ 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;