diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2021-04-16 22:15:21 -0700 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2021-04-16 22:15:21 -0700 |
| commit | 0597d77f3f49ac3ed1acecf88c6f6821ba166d15 (patch) | |
| tree | aa7a426a45d4c426f7de6e0983e3daf8e7447a68 | |
| parent | 86c5d0c1506c5bb8a938dec22fc673d35a449bfc (diff) | |
Bugfix for <selection> files having weird truncation issues
| -rw-r--r-- | bb.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -30,7 +30,7 @@ #define BB_NAME "bb" #endif -#define BB_VERSION "0.28.0" +#define BB_VERSION "0.28.1" #define MAX_BINDINGS 1024 #define SCROLLOFF MIN(5, (winsize.ws_row-4)/2) @@ -385,7 +385,7 @@ static entry_t* load_entry(bb_t *bb, const char *path) if (strcmp(entry->fullname, "/") == 0) { entry->name = entry->fullname; } else { - entry->name = &entry->fullname[strlen(bb->path)]; + entry->name = strrchr(entry->fullname, '/') + 1; // Last path component } if (S_ISLNK(filestat.st_mode)) entry->linkedmode = linkedstat.st_mode; |
