File tree Expand file tree Collapse file tree 1 file changed +13
-6
lines changed
Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -319,8 +319,19 @@ BOOL pf_modules_init(const char* modules_directory)
319319WIN32_FIND_DATA ffd ;
320320char * find_path ;
321321
322+ if (!PathFileExistsA (modules_directory ))
323+ {
324+ if (!CreateDirectoryA (modules_directory , NULL ))
325+ {
326+ WLog_ERR (TAG , "error occurred while creating modules directory: %s" , modules_directory );
327+ return FALSE;
328+ }
329+
330+ return TRUE;
331+ }
332+
322333WLog_DBG (TAG , "searching plugins in directory %s" , modules_directory );
323- find_path = GetCombinedPath (modules_directory , "*" );
334+ find_path = GetCombinedPath (modules_directory , "*.so " );
324335hFind = FindFirstFile (find_path , & ffd );
325336free (find_path );
326337
@@ -351,11 +362,7 @@ BOOL pf_modules_init(const char* modules_directory)
351362if ((ffd .dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY ) == 0 )
352363{
353364char * fullpath = GetCombinedPath (modules_directory , ffd .cFileName );
354- char * dot = strrchr (ffd .cFileName , '.' );
355-
356- if (dot && strcmp (dot , FREERDP_SHARED_LIBRARY_SUFFIX ) == 0 )
357- pf_modules_load_module (fullpath );
358-
365+ pf_modules_load_module (fullpath );
359366free (fullpath );
360367}
361368} while (FindNextFile (hFind , & ffd ) != 0 );
You can’t perform that action at this time.
0 commit comments