setupapi: Destination directory defaults to system directory.
Hans Leidekker
hans at codeweavers.com
Wed Mar 3 07:37:17 CST 2010
Fixes http://bugs.winehq.org/show_bug.cgi?id=21906
---
dlls/setupapi/queue.c | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/dlls/setupapi/queue.c b/dlls/setupapi/queue.c
index 6a2b8d6..d302924 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 );
}
--
1.6.3.3
More information about the wine-patches
mailing list