diff options
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -138,7 +138,7 @@ file_get_basename(const struct file * f) /* is the path a basename itself? */ if (strrchr(f->path, '/') == NULL) - return f->path; + return strdup(f->path); /* get the basename */ return str_tail(f->path, '/'); |