From 8aba9366edbafeada63105e000a101738338c91e Mon Sep 17 00:00:00 2001 From: Piotr Caban Date: Fri, 30 Jan 2015 17:03:36 +0100 Subject: [PATCH] shell32: Pass trash path to TRASH_EnumItems. --- dlls/shell32/recyclebin.c | 8 +++----- dlls/shell32/trash.c | 7 +++++-- dlls/shell32/xdg.h | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/dlls/shell32/recyclebin.c b/dlls/shell32/recyclebin.c index 7053998106d..28098afb17d 100644 --- a/dlls/shell32/recyclebin.c +++ b/dlls/shell32/recyclebin.c @@ -423,7 +423,7 @@ static HRESULT WINAPI RecycleBin_EnumObjects(IShellFolder2 *iface, HWND hwnd, SH if (grfFlags & SHCONTF_NONFOLDERS) { - if (FAILED(ret = TRASH_EnumItems(&pidls, &pidls_count))) + if (FAILED(ret = TRASH_EnumItems(NULL, &pidls, &pidls_count))) goto failed; for (i=0; ii64NumItems = cidl; @@ -900,9 +899,8 @@ HRESULT WINAPI SHEmptyRecycleBinW(HWND hwnd, LPCWSTR pszRootPath, DWORD dwFlags) HRESULT ret; TRACE("(%p, %s, 0x%08x)\n", hwnd, debugstr_w(pszRootPath) , dwFlags); - FIXME("Ignoring pszRootPath=%s\n",debugstr_w(pszRootPath)); - ret = TRASH_EnumItems(&apidl,&cidl); + ret = TRASH_EnumItems(pszRootPath, &apidl, &cidl); if (FAILED(ret)) return ret; diff --git a/dlls/shell32/trash.c b/dlls/shell32/trash.c index 3ca6e4ead39..f178570abba 100644 --- a/dlls/shell32/trash.c +++ b/dlls/shell32/trash.c @@ -100,7 +100,7 @@ BOOL TRASH_TrashFile(LPCWSTR wszPath) return (status == noErr); } -HRESULT TRASH_EnumItems(LPITEMIDLIST **pidls, int *count) +HRESULT TRASH_EnumItems(const WCHAR *path, LPITEMIDLIST **pidls, int *count) { FIXME("stub!\n"); return E_NOTIMPL; @@ -577,12 +577,15 @@ failed: return NULL; } -HRESULT TRASH_EnumItems(LPITEMIDLIST **pidls, int *count) +HRESULT TRASH_EnumItems(const WCHAR *path, LPITEMIDLIST **pidls, int *count) { int ti_count; int pos=0, i; HRESULT err = E_OUTOFMEMORY; HDPA tinfs; + + if(path) + FIXME("Ignoring path = %s\n", debugstr_w(path)); if (!TRASH_EnsureInitialized()) return E_FAIL; tinfs = enum_bucket_trashinfos(home_trash, &ti_count); diff --git a/dlls/shell32/xdg.h b/dlls/shell32/xdg.h index 62368874df8..dc3acb0476b 100644 --- a/dlls/shell32/xdg.h +++ b/dlls/shell32/xdg.h @@ -40,7 +40,7 @@ void XDG_FreeParsedFile(XDG_PARSED_FILE *file) DECLSPEC_HIDDEN; BOOL TRASH_CanTrashFile(LPCWSTR wszPath) DECLSPEC_HIDDEN; BOOL TRASH_TrashFile(LPCWSTR wszPath) DECLSPEC_HIDDEN; HRESULT TRASH_UnpackItemID(LPCSHITEMID id, WIN32_FIND_DATAW *data) DECLSPEC_HIDDEN; -HRESULT TRASH_EnumItems(LPITEMIDLIST **pidls, int *count) DECLSPEC_HIDDEN; +HRESULT TRASH_EnumItems(const WCHAR *path, LPITEMIDLIST **pidls, int *count) DECLSPEC_HIDDEN; HRESULT TRASH_RestoreItem(LPCITEMIDLIST pidl) DECLSPEC_HIDDEN; HRESULT TRASH_EraseItem(LPCITEMIDLIST pidl) DECLSPEC_HIDDEN;