diff --git a/src/rrdtool.c b/src/rrdtool.c index 56a82d0..ab66441 100644 --- a/src/rrdtool.c +++ b/src/rrdtool.c @@ -134,11 +134,14 @@ static int srrd_update (char *filename, char *template, int argc, const char **argv) { int status; - + char *chp; optind = 0; /* bug in librrd? */ rrd_clear_error (); - status = rrd_update_r (filename, template, argc, (void *) argv); + chp = strchr(argv[0], ':'); + *--chp = '0'; + + status = rrd_update_r (filename, template, argc, (void *) argv); if (status != 0) {