From: Andreas Fink Date: Thu, 21 Oct 2010 07:29:52 +0000 (+0000) Subject: *fix* applied patch from issue 299 X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=c65710168c480e5d9a27d528a87648f77cc04ca8;p=chaz%2Ftint2 *fix* applied patch from issue 299 --- diff --git a/src/battery/battery.c b/src/battery/battery.c index 9bb024e..faf27e9 100644 --- a/src/battery/battery.c +++ b/src/battery/battery.c @@ -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