mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 16:24:54 +02:00
#12681 fixed double number parse
This commit is contained in:
parent
139b924410
commit
babb7bce38
@ -59,7 +59,7 @@ Pandora_Module_Freedisk_Percent::run () {
|
|||||||
try {
|
try {
|
||||||
res = Pandora_Wmi::getDiskFreeSpacePercent (this->disk_id);
|
res = Pandora_Wmi::getDiskFreeSpacePercent (this->disk_id);
|
||||||
|
|
||||||
this->setOutput (longtostr (res));
|
this->setOutput (res);
|
||||||
} catch (Pandora_Wmi::Pandora_Wmi_Exception e) {
|
} catch (Pandora_Wmi::Pandora_Wmi_Exception e) {
|
||||||
this->has_output = false;
|
this->has_output = false;
|
||||||
}
|
}
|
||||||
|
@ -192,7 +192,7 @@ double
|
|||||||
Pandora_Wmi::getDiskFreeSpacePercent (string disk_id) {
|
Pandora_Wmi::getDiskFreeSpacePercent (string disk_id) {
|
||||||
CDhInitialize init;
|
CDhInitialize init;
|
||||||
CDispPtr wmi_svc, quickfixes;
|
CDispPtr wmi_svc, quickfixes;
|
||||||
double free_space = 0, size = 0;
|
double free_space = 0, size = 0;
|
||||||
string query;
|
string query;
|
||||||
|
|
||||||
query = "SELECT Size, FreeSpace FROM Win32_LogicalDisk WHERE DeviceID = \"" + disk_id + "\"";
|
query = "SELECT Size, FreeSpace FROM Win32_LogicalDisk WHERE DeviceID = \"" + disk_id + "\"";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user