aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bb.c b/bb.c
index 24b9515..590b327 100644
--- a/bb.c
+++ b/bb.c
@@ -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;