msi: prevent cryptical errors

André Hentschel nerv at dawncrow.de
Wed Jul 28 12:55:47 CDT 2010


when accidently using the wrong path then
	err:msi:MSI_OpenPackageW can't find L"asf.msi"
is more readable than
	err:msi:copy_package_to_temp failed to copy package L"asf.msi" to L"C:\\users\\dawncrow\\Temp\\msi71e7.tmp" (2)
---
 dlls/msi/package.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/dlls/msi/package.c b/dlls/msi/package.c
index d332168..7ac7c19 100644
--- a/dlls/msi/package.c
+++ b/dlls/msi/package.c
@@ -1313,6 +1313,12 @@ UINT MSI_OpenPackageW(LPCWSTR szPackage, MSIPACKAGE **pPackage)
         }
         else
         {
+            if (!PathFileExistsW(szPackage))
+            {
+                ERR("can't find %s\n", debugstr_w(szPackage));
+                return ERROR_FILE_NOT_FOUND;
+            }
+
             r = copy_package_to_temp( szPackage, temppath );
             if ( r != ERROR_SUCCESS )
                 return r;
-- 

Best Regards, André Hentschel



More information about the wine-patches mailing list