diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2020-02-23 18:05:40 -0800 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2020-02-23 18:05:40 -0800 |
| commit | 8820fda592b3d382d6d7814fbbb13b51fb33b822 (patch) | |
| tree | e692619b797092c9a2e3c1eee2447f1ebca2be17 | |
| parent | e1338716532199b2b8b300f9b78b0cabbf284796 (diff) | |
Fixed selection issue.
| -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'; |
