tmus

TUI Music Player
git clone https://git.sinitax.com/sinitax/tmus
Log | Files | Refs | Submodules | LICENSE | sfeed.txt

commit 440e88cfbbc2f24ca0fa22c448d597e751d49dc2
parent e96836532a103d8596d1768e2d71bffd6e858b60
Author: Louis Burda <quent.burda@gmail.com>
Date:   Sat,  4 Feb 2023 15:07:17 +0100

Fix tag_rename selection

Diffstat:
Msrc/data.c | 7+++++--
Msrc/tui.c | 2+-
2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/data.c b/src/data.c @@ -626,7 +626,10 @@ acquire_lock(const char *datadir) } file = fopen(lockpath, "w+"); - if (file == NULL) return false; + if (file == NULL) { + free(lockpath); + return false; + } snprintf(linebuf, sizeof(linebuf), "%i", getpid()); fputs(linebuf, file); fclose(file); @@ -668,7 +671,7 @@ data_load(void) if (!datadir) ERRORX(USER, "TMUS_DATA not set"); if (!acquire_lock(datadir)) - ERRORX(USER, "Data directory in use"); + ERRORX(USER, "Failed to lock datadir"); dir = opendir(datadir); if (!dir) ERROR(SYSTEM, "opendir %s", datadir); diff --git a/src/tui.c b/src/tui.c @@ -294,7 +294,7 @@ rename_current_tag(void) struct tag *tag; char *cmd; - link = list_at(&tags, track_nav.sel); + link = list_at(&tags, tag_nav.sel); if (!link) return false; tag = UPCAST(link, struct tag, link);