do not load guests starting with a ".", such as ".svn"
authorMartin Willi <martin@strongswan.org>
Thu, 9 Apr 2009 13:43:26 +0000 (13:43 -0000)
committerMartin Willi <martin@strongswan.org>
Thu, 9 Apr 2009 13:43:26 +0000 (13:43 -0000)
src/dumm/dumm.c

index bf20149..70f5dfb 100644 (file)
@@ -238,8 +238,8 @@ static void load_guests(private_dumm_t *this)
        
        while ((ent = readdir(dir)))
        {
-               if (streq(ent->d_name, ".") ||  streq(ent->d_name, ".."))
-               {
+               if (*ent->d_name == '.')
+               {       /* skip ".", ".." and hidden files (such as ".svn") */
                        continue;
                }
                guest = guest_load(this->guest_dir, ent->d_name);