setupapi: if needed create directories for fake dlls
Alexandre Julliard
julliard at winehq.org
Mon Aug 20 05:53:33 CDT 2007
"Mikolaj Zalewski" <mikolajz at google.com> writes:
> @@ -302,9 +302,28 @@ BOOL create_fake_dll( const WCHAR *name,
> else
> {
> h = CreateFileW( name, GENERIC_WRITE, 0, NULL, CREATE_NEW, 0, NULL );
> +
> + if (h == INVALID_HANDLE_VALUE && GetLastError() == ERROR_PATH_NOT_FOUND)
> + {
> + WCHAR *pathel;
> +
> + /* create the directory/directories */
> + pathel = strchrW(name, '\\');
> + while (pathel != NULL)
> + {
> + *pathel = 0;
You shouldn't write to the name, it's a const pointer, even if strchrW
hides the warning.
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list