|
From: Armin B. <arm...@de...> - 2005-04-08 15:16:19
|
Eduardo Pereira Habkost wrote:
> On Fri, Apr 08, 2005 at 04:10:10PM +0200, Armin Bauer wrote:
>
>>no. we wouldnt need it actually. its just to speed up the loading. the
>>code below just states to NOT load files ending with .la (which are
>>always installed from source). This is just a optimization to speed
>>things up.
>
>
> I am talking about the *lib.la-wont-load stuff, and not the *.la
> optimization.
>
> Actually, with the last change the '*lib.la' checking is redundant:
> *.la files will not be loaded, anyway.
>
>
>>The other reason to do this is to prevent people from creating special
>>files or other stuff in this directory that would then get loaded.
>
>
> Right, I agree with this. But, if we will load only the .so files,
> why not just check if the file ends with .so?
>
right. so this will do:
!g_file_test(filename, G_FILE_TEST_IS_REGULAR) || g_file_test(filename,
G_FILE_TEST_IS_SYMLINK) || !g_pattern_match_simple("*.so", filename) ||
g_pattern_match_simple("*lib.so", filename)
the lib.so test is there so we dont load files that end with *lib.so
which are library plugins (like the kdepim_sync.so and kdepim_lib.so files)
|