The ACPI code in the `battery' plugin now ignores `dirent's that begin with a dot...
authorocto <octo>
Sat, 28 Jan 2006 10:46:11 +0000 (10:46 +0000)
committerocto <octo>
Sat, 28 Jan 2006 10:46:11 +0000 (10:46 +0000)
src/battery.c

index 123a05a..541bab3 100644 (file)
@@ -256,6 +256,9 @@ static void battery_read (void)
 
                while ((ent = readdir (dh)) != NULL)
                {
+                       if (ent->d_name[0] == '.')
+                               continue;
+
                        len = snprintf (filename, BUFSIZE, "/proc/acpi/battery/%s/state", ent->d_name);
                        if ((len >= BUFSIZE) || (len < 0))
                                continue;