]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commitdiff
add the missing 0
authorTobias Oetiker <tobi@oetiker.ch>
Fri, 9 Jan 2015 13:32:10 +0000 (14:32 +0100)
committerTobias Oetiker <tobi@oetiker.ch>
Fri, 9 Jan 2015 13:32:10 +0000 (14:32 +0100)
src/rrd_client.c

index 4f102394a44970bcb19a85895d8d79cec040b894..cb7dbc891989968cedeaf3a0b3f3e6c73192bfc1 100644 (file)
@@ -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);