Module: wine Branch: master Commit: a0571a2d3a025cf07e0cea6281ad97a88654816c URL: https://gitlab.winehq.org/wine/wine/-/commit/a0571a2d3a025cf07e0cea6281ad97a...
Author: Vladislav Timonin timoninvlad@yandex.ru Date: Mon Jun 12 18:05:28 2023 +0700
shell32: Don't show size for inaccessible drives in My Computer.
---
dlls/shell32/shfldr_mycomp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/shell32/shfldr_mycomp.c b/dlls/shell32/shfldr_mycomp.c index 7083ea18763..5aa540c9376 100644 --- a/dlls/shell32/shfldr_mycomp.c +++ b/dlls/shell32/shfldr_mycomp.c @@ -816,7 +816,8 @@ static HRESULT WINAPI ISF_MyComputer_fnGetDetailsOf (IShellFolder2 *iface, break;
_ILSimpleGetTextW(pidl, path, MAX_PATH); - GetDiskFreeSpaceExW(path, NULL, &bytes, NULL); + if (!GetDiskFreeSpaceExW(path, NULL, &bytes, NULL)) + break;
psd->str.uType = STRRET_WSTR; psd->str.u.pOleStr = CoTaskMemAlloc((MAX_PATH + 1) * sizeof(WCHAR)); @@ -827,7 +828,8 @@ static HRESULT WINAPI ISF_MyComputer_fnGetDetailsOf (IShellFolder2 *iface, break;
_ILSimpleGetTextW(pidl, path, MAX_PATH); - GetDiskFreeSpaceExW(path, &bytes, NULL, NULL); + if (!GetDiskFreeSpaceExW(path, &bytes, NULL, NULL)) + break;
psd->str.uType = STRRET_WSTR; psd->str.u.pOleStr = CoTaskMemAlloc((MAX_PATH + 1) * sizeof(WCHAR));