- skip dotfiles in .d directories
authorMichael Schroeder <mls@suse.de>
Tue, 1 Jun 2010 20:03:19 +0000 (22:03 +0200)
committerMichael Schroeder <mls@suse.de>
Tue, 1 Jun 2010 20:03:19 +0000 (22:03 +0200)
examples/solv.c

index dcf00ce..5f5f7d8 100644 (file)
@@ -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;