setupapi: Destination directory defaults to system directory.

This commit is contained in:
Hans Leidekker 2010-03-03 14:37:17 +01:00 committed by Alexandre Julliard
parent ab0e037ee0
commit 1b8ba25371
1 changed files with 10 additions and 3 deletions

View File

@ -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 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}; static const WCHAR Def[] = {'D','e','f','a','u','l','t','D','e','s','t','D','i','r',0};
INFCONTEXT context; INFCONTEXT context;
WCHAR systemdir[MAX_PATH], *dir;
BOOL ret;
if (!SetupFindFirstLineW( hinf, Dest, section, &context ) && if (!(ret = SetupFindFirstLineW( hinf, Dest, section, &context )))
!SetupFindFirstLineW( hinf, Dest, Def, &context )) return NULL; ret = SetupFindFirstLineW( hinf, Dest, Def, &context );
return PARSER_get_dest_dir( &context );
if (ret && (dir = PARSER_get_dest_dir( &context )))
return dir;
GetSystemDirectoryW( systemdir, MAX_PATH );
return strdupW( systemdir );
} }