Code

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 123a05acd812915a4095feee5c87e61f3a259cd0..541bab3d09a6d203f43bf6e8d2ddf2be2124a71b 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;