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 a7b9067e0f
commit 7748deb557
1 changed files with 4 additions and 0 deletions

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)