Do not load lua-scripts starting with '.'

svn path=/trunk/; revision=33793
This commit is contained in:
Stig Bjørlykke 2010-08-13 11:18:44 +00:00
parent ceb7f5e9d5
commit 30875d714c
1 changed files with 8 additions and 0 deletions

View File

@ -288,6 +288,14 @@ 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) {