]> Dogcows Code - chaz/tint2/commitdiff
*fix* applied patch from issue 299
authorAndreas Fink <andreas.fink85@googlemail.com>
Thu, 21 Oct 2010 07:29:52 +0000 (07:29 +0000)
committerAndreas Fink <andreas.fink85@googlemail.com>
Thu, 21 Oct 2010 07:29:52 +0000 (07:29 +0000)
src/battery/battery.c

index 9bb024e5c567f498694aecdae56e7946065a5932..faf27e9f5a1596a99ee065aac8650c4c0d452f59 100644 (file)
@@ -194,8 +194,14 @@ void init_battery()
                }
                g_free(path2);
        }
-       if (path_energy_now && path_energy_full) {
+
+       path_current_now = g_build_filename(battery_dir, "power_now", NULL);
+       if (!g_file_test (path_current_now, G_FILE_TEST_EXISTS)) {
+               g_free(path_current_now);
                path_current_now = g_build_filename(battery_dir, "current_now", NULL);
+       }
+
+       if (path_energy_now && path_energy_full) {
                path_status = g_build_filename(battery_dir, "status", NULL);
 
                // check file
This page took 0.023676 seconds and 4 git commands to generate.