diff options
| author | Stef Walter <stef@memberwebs.com> | 2006-08-06 22:47:11 +0000 | 
|---|---|---|
| committer | Stef Walter <stef@memberwebs.com> | 2006-08-06 22:47:11 +0000 | 
| commit | af9c5fc92f0a9c5b5becfdbcb9f6d3a4b80ad723 (patch) | |
| tree | 5936339d5c18ca9aef5cf8b3c80b1d3751b176c9 | |
| parent | a75f26027b40952d002982d4bdfe89f2b894bf97 (diff) | |
when in -n mode, print commands even when it exists.
| -rw-r--r-- | tools/rrdbot-create.c | 21 | 
1 files changed, 12 insertions, 9 deletions
| diff --git a/tools/rrdbot-create.c b/tools/rrdbot-create.c index 9760051..aa2ae0b 100644 --- a/tools/rrdbot-create.c +++ b/tools/rrdbot-create.c @@ -458,16 +458,19 @@ check_create_file(create_ctx* ctx)          rrd[sizeof(rrd) - 1] = 0;      } -    /* Make sure it exists */ -    if(access(rrd, F_OK) == 0) +    if(!g_print)      { -        verb("rrd file already exists, skipping: %s", rrd); -        return; -    } -    else if(errno != ENOENT) -    { -        warn("couldn't check rrd file: %s", rrd); -        return; +        /* Make sure it exists */ +        if(access(rrd, F_OK) == 0) +        { +            verb("rrd file already exists, skipping: %s", rrd); +            return; +        } +        else if(errno != ENOENT) +        { +            warn("couldn't check rrd file: %s", rrd); +            return; +        }      }      if(ctx->skip || create_file(ctx, rrd) < 0) | 
