[2/8] scrrun: Make IFolderCollection::get_Count use is_dir_data() helper.

Dmitry Timoshkov dmitry at baikal.ru
Mon Jan 27 20:35:48 CST 2014


This patch makes IFolderCollection::get_Count return correct number of
folder elements that IEnumVARIANT::Skip or IEnumVARIANT::Next will be
able to handle.
---
 dlls/scrrun/filesystem.c       | 2 +-
 dlls/scrrun/tests/filesystem.c | 2 --
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/dlls/scrrun/filesystem.c b/dlls/scrrun/filesystem.c
index bfb201c..f7664c3 100644
--- a/dlls/scrrun/filesystem.c
+++ b/dlls/scrrun/filesystem.c
@@ -913,7 +913,7 @@ static HRESULT WINAPI foldercoll_get_Count(IFolderCollection *iface, LONG *count
 
     do
     {
-        if (data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
+        if (is_dir_data(&data))
             *count += 1;
     } while (FindNextFileW(handle, &data));
     FindClose(handle);
diff --git a/dlls/scrrun/tests/filesystem.c b/dlls/scrrun/tests/filesystem.c
index 7c0fe7b..b0b527b 100644
--- a/dlls/scrrun/tests/filesystem.c
+++ b/dlls/scrrun/tests/filesystem.c
@@ -830,7 +830,6 @@ static void test_FolderCollection(void)
     count = 0;
     hr = IFolderCollection_get_Count(folders, &count);
     ok(hr == S_OK, "got 0x%08x\n", hr);
-todo_wine
     ok(count == 2, "got %d\n", count);
 
     lstrcpyW(pathW, buffW);
@@ -841,7 +840,6 @@ todo_wine
     count = 0;
     hr = IFolderCollection_get_Count(folders, &count);
     ok(hr == S_OK, "got 0x%08x\n", hr);
-todo_wine
     ok(count == 3, "got %d\n", count);
 
     hr = IFolderCollection_get__NewEnum(folders, NULL);
-- 
1.8.5.3




More information about the wine-patches mailing list