From e3fa51f18bc8922c12161cdccba6e6b2a84c3a27 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Wilfried=20G=C3=B6esgens?= Date: Thu, 14 Jan 2010 21:41:32 +0000 Subject: [PATCH] * ignore .swp and .orig files so some more void files won't make it into our template repository. --- webcit/subst.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/webcit/subst.c b/webcit/subst.c index ca2a6975b..a4d8d2aaf 100644 --- a/webcit/subst.c +++ b/webcit/subst.c @@ -1678,7 +1678,7 @@ int LoadTemplateDir(const StrBuf *DirName, HashList *wireless, HashList *big, co case DT_DIR: /* Skip directories we are not interested in... */ if (strcmp(filedir_entry->d_name, ".svn") == 0) - break; + continue; FlushStrBuf(SubKey); if (!Toplevel) { @@ -1705,7 +1705,9 @@ int LoadTemplateDir(const StrBuf *DirName, HashList *wireless, HashList *big, co d_without_ext --; if ((d_without_ext == 0) || (d_namelen < 3)) continue; - if ((d_namelen > 1) && filedir_entry->d_name[d_namelen - 1] == '~') + if (((d_namelen > 1) && filedir_entry->d_name[d_namelen - 1] == '~') || + (strcmp(&filedir_entry->d_name[d_without_ext], ".orig") == 0) || + (strcmp(&filedir_entry->d_name[d_without_ext], ".swp") == 0)) continue; /* Ignore backup files... */ /* .m.xxx is for mobile useragents! */ if (d_without_ext > 2) -- 2.30.2