From fcb924c1441f573fc6eabb2afcb44716de373e1c Mon Sep 17 00:00:00 2001 From: Hans Leidekker Date: Fri, 3 Jan 2014 15:01:00 +0100 Subject: [PATCH] msi: Fall back to the global temporary directory when the TempFolder property resolves to a non-existing directory. --- 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 eadb355e13..63bec19bc9 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 )) {