summaryrefslogtreecommitdiff
blob: 3f933e2f522326c443c8e12a03d3b6399a0bb5d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Index: battery.c
===================================================================
--- src/battery/battery.c	(revision 575)
+++ src/battery/battery.c	(revision 576)
@@ -194,8 +194,14 @@
 		}
 		g_free(path2);
 	}
+
+	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_current_now = g_build_filename(battery_dir, "current_now", NULL);
 		path_status = g_build_filename(battery_dir, "status", NULL);
 
 		// check file