diff options
Diffstat (limited to 'bb.c')
| -rw-r--r-- | bb.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -292,7 +292,10 @@ entry_t* load_entry(bb_t *bb, const char *path) if (!path || !path[0]) return NULL; if (lstat(path, &filestat) == -1) return NULL; char pbuf[PATH_MAX]; - sprintf(pbuf, "%s%s", bb->path, path); + if (path[0] == '/') + strcpy(pbuf, path); + else + sprintf(pbuf, "%s%s", bb->path, path); if (pbuf[strlen(pbuf)-1] == '/' && pbuf[1]) pbuf[strlen(pbuf)-1] = '\0'; |
