Do case insensitive search for lua scripts to load.

Skip files starting with . also on windows, as the home directory
may be mounted from a server with a proper filesystem.

svn path=/trunk/; revision=38737
This commit is contained in:
Stig Bjørlykke 2011-08-25 19:01:05 +00:00
parent f7956e0e1d
commit c6eb911c93
1 changed files with 1 additions and 3 deletions

View File

@ -293,17 +293,15 @@ static void lua_load_plugins (const char *dirname)
continue;
}
#ifndef _WIN32
/* skip files starting wih . */
if (name[0] == '.') {
g_free(filename);
continue;
}
#endif
/* skip anything but files with .lua suffix */
dot = strrchr(name, '.');
if (dot == NULL || strcmp(dot+1, "lua") != 0) {
if (dot == NULL || g_ascii_strcasecmp(dot+1, "lua") != 0) {
g_free(filename);
continue;
}