[Wine-patches] [eterhack] msi: Try to find a file without ignoring case (eterbug #818).

Alexander Morozov amorozov на etersoft.ru
Вт Июл 28 17:08:52 MSD 2009


----------- следующая часть -----------
From 21a353a83c79ab445026e683a10dbfcf2eeac070 Mon Sep 17 00:00:00 2001
From: Alexander Morozov <amorozov на etersoft.ru>
Date: Tue, 28 Jul 2009 16:24:53 +0400
Subject: [eterhack] msi: Try to find a file without ignoring case (eterbug #818).

---
 dlls/msi/helpers.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/dlls/msi/helpers.c b/dlls/msi/helpers.c
index a60eada..d506a8a 100644
--- a/dlls/msi/helpers.c
+++ b/dlls/msi/helpers.c
@@ -120,14 +120,16 @@ MSIFEATURE* get_loaded_feature(MSIPACKAGE* package, LPCWSTR Feature )
 
 MSIFILE* get_loaded_file( MSIPACKAGE* package, LPCWSTR key )
 {
-    MSIFILE *file;
+    MSIFILE *file, *file_icase = NULL;
 
     LIST_FOR_EACH_ENTRY( file, &package->files, MSIFILE, entry )
     {
-        if (lstrcmpiW( key, file->File )==0)
+        if (lstrcmpW( key, file->File )==0)
             return file;
+        if (!file_icase && lstrcmpiW( key, file->File)==0)
+            file_icase = file;
     }
-    return NULL;
+    return file_icase;
 }
 
 int track_tempfile( MSIPACKAGE *package, LPCWSTR path )
-- 
1.6.3.3



Подробная информация о списке рассылки Wine-patches