Commit 8aba9366 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

shell32: Pass trash path to TRASH_EnumItems.

parent d46862b4
......@@ -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; i<pidls_count; i++)
if (!AddToEnumList(list, pidls[i]))
......@@ -863,9 +863,8 @@ HRESULT WINAPI SHQueryRecycleBinW(LPCWSTR pszRootPath, LPSHQUERYRBINFO pSHQueryR
HRESULT hr;
TRACE("(%s, %p)\n", debugstr_w(pszRootPath), pSHQueryRBInfo);
FIXME("Ignoring pszRootPath=%s\n",debugstr_w(pszRootPath));
hr = TRASH_EnumItems(&apidl,&cidl);
hr = TRASH_EnumItems(pszRootPath, &apidl, &cidl);
if (FAILED(hr))
return hr;
pSHQueryRBInfo->i64NumItems = 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;
......
......@@ -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);
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment