Commit 02d41b7b authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

winspool: Pre-1.6 versions of CUPS can leave behind a file when cupsGetPDD3…

winspool: Pre-1.6 versions of CUPS can leave behind a file when cupsGetPDD3 fails, so clear up afterwards.
parent 08c17ada
......@@ -833,11 +833,14 @@ static BOOL get_cups_ppd( const char *printer_name, const WCHAR *ppd )
http_status = cupsGetPPD3_wrapper( 0, printer_name, &modtime,
unix_name, strlen( unix_name ) + 1 );
if (http_status != HTTP_OK) unlink( unix_name );
HeapFree( GetProcessHeap(), 0, unix_name );
if (http_status == HTTP_OK) return TRUE;
TRACE( "failed to get ppd for printer %s from cups, calling fallback\n", debugstr_a(printer_name) );
TRACE( "failed to get ppd for printer %s from cups (status %d), calling fallback\n",
debugstr_a(printer_name), http_status );
return get_fallback_ppd( printer_name, ppd );
}
......
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