Commit bea70326 authored by Detlef Riekenberg's avatar Detlef Riekenberg Committed by Alexandre Julliard

comdlg32: Exclude the driver path from the result.

parent ca69cc60
......@@ -322,6 +322,8 @@ static BOOL PRINTDLG_CreateDevNames(HGLOBAL *hmem, const char* DeviceDriverName,
char buf[260];
DWORD dwBufLen = sizeof(buf);
DeviceDriverName = strrchr(DeviceDriverName, '\\') + 1;
size = strlen(DeviceDriverName) + 1
+ strlen(DeviceName) + 1
+ strlen(OutputPort) + 1
......@@ -365,6 +367,8 @@ static BOOL PRINTDLG_CreateDevNamesW(HGLOBAL *hmem, LPCWSTR DeviceDriverName,
WCHAR bufW[260];
DWORD dwBufLen = sizeof(bufW) / sizeof(WCHAR);
DeviceDriverName = strrchrW(DeviceDriverName, '\\') + 1;
size = sizeof(WCHAR)*lstrlenW(DeviceDriverName) + 2
+ sizeof(WCHAR)*lstrlenW(DeviceName) + 2
+ sizeof(WCHAR)*lstrlenW(OutputPort) + 2
......
......@@ -200,9 +200,7 @@ static void test_PrintDlgA(void)
/* The Driver Entry does not include a Path */
ptr = strrchr(driver, '\\');
todo_wine {
ok( ptr == NULL, "got %p for '%s' (expected NULL for a simple name)\n", ptr, driver);
}
/* The Driver Entry does not have an extension (fixed to ".drv") */
ptr = strrchr(driver, '.');
......@@ -220,11 +218,8 @@ static void test_PrintDlgA(void)
res, GetLastError(), ptr, buffer);
if (ptr) ptr[0] = '\0';
todo_wine {
ok( lstrcmpiA(driver, buffer) == 0,
"got driver '%s' (expected '%s')\n", driver, buffer);
}
}
GlobalUnlock(pDlg->hDevNames);
......
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