From cd5d9abf632a6de53c156b5e4762a8e56ef661a0 Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Fri, 22 Jan 2010 02:02:45 +0100 Subject: [PATCH] Do not read in help files starting with a dot (including dot and dot-dot). --- src/cache.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/cache.c b/src/cache.c index c8210504..eb4ca6d9 100644 --- a/src/cache.c +++ b/src/cache.c @@ -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)