From: Michael Schroeder Date: Tue, 1 Jun 2010 20:03:19 +0000 (+0200) Subject: - skip dotfiles in .d directories X-Git-Tag: BASE-SuSE-Code-12_1-Branch~158^2~23 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=906e25d6abd25a5134dcfc35346bb26930370425;p=platform%2Fupstream%2Flibsolv.git - skip dotfiles in .d directories --- diff --git a/examples/solv.c b/examples/solv.c index dcf00ce..5f5f7d8 100644 --- a/examples/solv.c +++ b/examples/solv.c @@ -220,6 +220,8 @@ read_repoinfos(Pool *pool, const char *reposdir, int *nrepoinfosp) } while ((ent = readdir(dir)) != 0) { + if (ent->d_name[0] == '.') + continue; l = strlen(ent->d_name); if (l < 6 || rdlen + 2 + l >= sizeof(buf) || strcmp(ent->d_name + l - 5, ".repo") != 0) continue; @@ -359,6 +361,8 @@ read_repoinfos(Pool *pool, const char *reposdir, int *nrepoinfosp) closedir(dir); break; } + if (ent->d_name[0] == '.') + continue; l = strlen(ent->d_name); if (l < 5 || strcmp(ent->d_name + l - 5, ".list") != 0) continue;