map

minimalist audio player
git clone https://git.porkepik.fr/map
Log | Files | Refs | README | LICENSE

commit d983274cb143c2d58119234692c8613dafa48252
parent da5c8dd896263b42f68f5a62bc21a2b91794bb78
Author: Thomas Philippe <dev@porkepik.fr>
Date:   Tue,  4 Aug 2020 13:16:54 +0200

fix opening folders without a trailing slash

Diffstat:
Mmap.c | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/map.c b/map.c @@ -141,6 +141,8 @@ init_track(const char *path, const char *filename) if (!tmp->filename) errx(1, "malloc failure"); strcpy(tmp->filename, path); + if (strlen(filename) && path[strlen(path) - 1] != '/') + strcat(tmp->filename, "/"); strcat(tmp->filename, filename); if (strend(tmp->filename, ".mp3")) {