Piotr Caban : shell32: Pass trash path to TRASH_EnumItems.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Feb 2 08:32:23 CST 2015
Module: wine
Branch: master
Commit: 8aba9366edbafeada63105e000a101738338c91e
URL: http://source.winehq.org/git/wine.git/?a=commit;h=8aba9366edbafeada63105e000a101738338c91e
Author: Piotr Caban <piotr at codeweavers.com>
Date: Fri Jan 30 17:03:36 2015 +0100
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 7053998..28098af 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; 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;
diff --git a/dlls/shell32/trash.c b/dlls/shell32/trash.c
index 3ca6e4e..f178570 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 6236887..dc3acb0 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;
More information about the wine-cvs
mailing list