From 1b8ba2537111f0d691d2592bb4ffb6bc4fe4f20e Mon Sep 17 00:00:00 2001 From: Hans Leidekker Date: Wed, 3 Mar 2010 14:37:17 +0100 Subject: [PATCH] setupapi: Destination directory defaults to system directory. --- dlls/setupapi/queue.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/dlls/setupapi/queue.c b/dlls/setupapi/queue.c index 6a2b8d6200..d30292453b 100644 --- a/dlls/setupapi/queue.c +++ b/dlls/setupapi/queue.c @@ -338,10 +338,17 @@ static WCHAR *get_destination_dir( HINF hinf, const WCHAR *section ) static const WCHAR Dest[] = {'D','e','s','t','i','n','a','t','i','o','n','D','i','r','s',0}; static const WCHAR Def[] = {'D','e','f','a','u','l','t','D','e','s','t','D','i','r',0}; INFCONTEXT context; + WCHAR systemdir[MAX_PATH], *dir; + BOOL ret; - if (!SetupFindFirstLineW( hinf, Dest, section, &context ) && - !SetupFindFirstLineW( hinf, Dest, Def, &context )) return NULL; - return PARSER_get_dest_dir( &context ); + if (!(ret = SetupFindFirstLineW( hinf, Dest, section, &context ))) + ret = SetupFindFirstLineW( hinf, Dest, Def, &context ); + + if (ret && (dir = PARSER_get_dest_dir( &context ))) + return dir; + + GetSystemDirectoryW( systemdir, MAX_PATH ); + return strdupW( systemdir ); }