[2/3] msi: Fall back to the global temporary directory when the TempFolder property resolves to a non-existing directory.

Hans Leidekker hans at codeweavers.com
Fri Jan 3 08:01:00 CST 2014


---
 dlls/msi/custom.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/msi/custom.c b/dlls/msi/custom.c
index eadb355..63bec19 100644
--- a/dlls/msi/custom.c
+++ b/dlls/msi/custom.c
@@ -215,8 +215,8 @@ static MSIBINARY *create_temp_binary( MSIPACKAGE *package, LPCWSTR source, BOOL
     DWORD sz = MAX_PATH, write;
     UINT r;
 
-    if (msi_get_property(package->db, szTempFolder, fmt, &sz) != ERROR_SUCCESS)
-        GetTempPathW(MAX_PATH, fmt);
+    if (msi_get_property(package->db, szTempFolder, fmt, &sz) != ERROR_SUCCESS ||
+        GetFileAttributesW(fmt) == INVALID_FILE_ATTRIBUTES) GetTempPathW(MAX_PATH, fmt);
 
     if (!GetTempFileNameW( fmt, szMsi, 0, tmpfile ))
     {
-- 
1.8.5.2







More information about the wine-patches mailing list