[PATCH v2] shell32/tests: Fix the known folder relative path check for multiple CD drives.

Francois Gouget fgouget at codeweavers.com
Tue Jun 29 10:59:51 CDT 2021


When there is more than one CD drive the extra drives typically get a
folder called "Burn1", etc.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
v2: Fixed the signed-off-by.
 dlls/shell32/tests/shellpath.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/dlls/shell32/tests/shellpath.c b/dlls/shell32/tests/shellpath.c
index 62fa68eb20a..ea6f92ce827 100644
--- a/dlls/shell32/tests/shellpath.c
+++ b/dlls/shell32/tests/shellpath.c
@@ -2067,7 +2067,11 @@ static void check_known_folder(IKnownFolderManager *mgr, KNOWNFOLDERID *folderId
                                         debugstr_w(ikf_path), debugstr_w(ikf_parent_path));
                                 ok_(__FILE__, known_folder->line)(*(ikf_path + lstrlenW(ikf_parent_path)) == '\\',
                                         "Missing slash\n");
-                                ok_(__FILE__, known_folder->line)(wcsicmp(kfd.pszRelativePath, ikf_path + lstrlenW(ikf_parent_path) + 1) == 0,
+                                ok_(__FILE__, known_folder->line)(
+                                        wcsicmp(kfd.pszRelativePath, ikf_path + lstrlenW(ikf_parent_path) + 1) == 0 ||
+                                        /* With multiple drives, there are multiple CD-burning folders */
+                                        (IsEqualGUID(folderId, &FOLDERID_CDBurning) &&
+                                         wcsnicmp(kfd.pszRelativePath, ikf_path + lstrlenW(ikf_parent_path) + 1, wcslen(kfd.pszRelativePath)) == 0),
                                         "Full path %s does not end with relative path %s\n",
                                         debugstr_w(ikf_path), debugstr_w(kfd.pszRelativePath));
 
-- 
2.20.1



More information about the wine-devel mailing list