[server,proxy] check file exists before library load

To avoid spamming the log with errors check if the file exists (and log
at debug level)
This commit is contained in:
akallabeth
2025-09-12 10:04:31 +02:00
parent 919a569d56
commit a279a145df

View File

@@ -530,6 +530,12 @@ error:
static BOOL pf_modules_load_dynamic_module(const char* module_path, proxyModule* module,
void* userdata)
{
if (!winpr_PathFileExists(module_path))
{
WLog_DBG(TAG, "failed loading external library: file '%s' does not exist", module_path);
return FALSE;
}
HANDLE handle = LoadLibraryX(module_path);
if (handle == NULL)