From: Tobias Oetiker Date: Fri, 9 Jan 2015 13:32:10 +0000 (+0100) Subject: add the missing 0 X-Git-Tag: v1.5.0-rc2~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=32e26fd527e150712409181b167a960d9802a6d7;p=thirdparty%2Frrdtool-1.x.git add the missing 0 --- diff --git a/src/rrd_client.c b/src/rrd_client.c index 4f102394..cb7dbc89 100644 --- a/src/rrd_client.c +++ b/src/rrd_client.c @@ -115,6 +115,9 @@ static const char *get_path (const char *path, char *resolved_path) /* {{{ */ : strndup(path, lastslash - path); #else : strdup(path); + if (lastslash && lastslash != path){ + dir[lastslash-path]='\0'; + } #endif if (dir != NULL) { ret = realpath(dir, buffer);