0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-26 00:32:35 +01:00

Do not read in help files starting with a dot (including dot and dot-dot).

This commit is contained in:
Jilles Tjoelker 2010-01-22 02:02:45 +01:00
parent 0b5ea4f865
commit cd5d9abf63

View file

@ -253,6 +253,8 @@ load_help(void)
while((ldirent = readdir(helpfile_dir)) != NULL)
{
if(ldirent->d_name[0] == '.')
continue;
rb_snprintf(filename, sizeof(filename), "%s/%s", HPATH, ldirent->d_name);
cacheptr = cache_file(filename, ldirent->d_name, HELP_OPER);
irc_dictionary_add(help_dict_oper, cacheptr->name, cacheptr);
@ -266,6 +268,8 @@ load_help(void)
while((ldirent = readdir(helpfile_dir)) != NULL)
{
if(ldirent->d_name[0] == '.')
continue;
rb_snprintf(filename, sizeof(filename), "%s/%s", UHPATH, ldirent->d_name);
#if defined(S_ISLNK) && defined(HAVE_LSTAT)