Merge pull request #2837 from paulgear/log-rrd-rename

Remove null field on rename
This commit is contained in:
Neil Lathwood
2016-01-21 23:55:16 +00:00
+2 -2
View File
@@ -370,11 +370,11 @@ function rrd_file_rename($device, $oldname, $newname)
$newrrd = rrd_name($device['hostname'], $newname);
if (is_file($oldrrd) && !is_file($newrrd)) {
if (rename($oldrrd, $newrrd)) {
log_event("Renamed $oldrrd to $newrrd", $device);
log_event("Renamed $oldrrd to $newrrd", $device, "poller");
return true;
}
else {
log_event("Failed to rename $oldrrd to $newrrd", $device);
log_event("Failed to rename $oldrrd to $newrrd", $device, "poller");
return false;
}
}