Commit 69164eac authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

localspl: Have GetPrinterDriverDirectory create the driver directory.

This is needed so that during wineprefix creation, winspool.drv can succeed in printer initialisation.
parent bf263a34
......@@ -140,7 +140,8 @@ static const WCHAR printersW[] = {'S','y','s','t','e','m','\\',
'C','o','n','t','r','o','l','\\',
'P','r','i','n','t','\\',
'P','r','i','n','t','e','r','s',0};
static const WCHAR spooldriversW[] = {'\\','s','p','o','o','l','\\','d','r','i','v','e','r','s','\\',0};
static const WCHAR spoolW[] = {'\\','s','p','o','o','l',0};
static const WCHAR driversW[] = {'\\','d','r','i','v','e','r','s','\\',0};
static const WCHAR spoolprtprocsW[] = {'\\','s','p','o','o','l','\\','p','r','t','p','r','o','c','s','\\',0};
static const WCHAR version0_regpathW[] = {'\\','V','e','r','s','i','o','n','-','0',0};
static const WCHAR version0_subdirW[] = {'\\','0',0};
......@@ -1077,7 +1078,8 @@ static BOOL WINAPI fpGetPrinterDriverDirectory(LPWSTR pName, LPWSTR pEnvironment
/* GetSystemDirectoryW returns number of WCHAR including the '\0' */
needed = GetSystemDirectoryW(NULL, 0);
/* add the Size for the Subdirectories */
needed += lstrlenW(spooldriversW);
needed += lstrlenW(spoolW);
needed += lstrlenW(driversW);
needed += lstrlenW(env->subdir);
needed *= sizeof(WCHAR); /* return-value is size in Bytes */
......@@ -1096,8 +1098,12 @@ static BOOL WINAPI fpGetPrinterDriverDirectory(LPWSTR pName, LPWSTR pEnvironment
GetSystemDirectoryW( dir, cbBuf / sizeof(WCHAR) );
/* add the Subdirectories */
lstrcatW( dir, spooldriversW );
lstrcatW( dir, spoolW );
CreateDirectoryW( dir, NULL );
lstrcatW( dir, driversW );
CreateDirectoryW( dir, NULL );
lstrcatW( dir, env->subdir );
CreateDirectoryW( dir, NULL );
TRACE( "=> %s\n", debugstr_w( dir ) );
return TRUE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment