Merge pull request #11354 from akallabeth/printer-filter-config

[channels,printer] Ignore printer settings
This commit is contained in:
Martin Fleisz
2025-03-14 13:16:34 +01:00
committed by GitHub

View File

@@ -160,15 +160,24 @@ static BOOL printer_read_setting(const char* path, prn_conf_t type, void** data,
DWORD highSize = 0;
DWORD read = 0;
BOOL rc = FALSE;
HANDLE file = NULL;
char* fdata = NULL;
const char* name = filemap[type];
char* abs = GetCombinedPath(path, name);
switch (type)
{
case PRN_CONF_DATA:
break;
default:
WLog_DBG(TAG, "Printer option %s ignored", name);
return FALSE;
}
char* abs = GetCombinedPath(path, name);
if (!abs)
return FALSE;
file = CreateFileA(abs, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
HANDLE file =
CreateFileA(abs, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
free(abs);
if (file == INVALID_HANDLE_VALUE)