diff options
| author | Louis Burda <quent.burda@gmail.com> | 2023-02-04 15:07:17 +0100 |
|---|---|---|
| committer | Louis Burda <quent.burda@gmail.com> | 2023-02-04 15:07:17 +0100 |
| commit | 440e88cfbbc2f24ca0fa22c448d597e751d49dc2 (patch) | |
| tree | 443a2c3442f33bbd80580e7df9a044a4cbec884c /src | |
| parent | e96836532a103d8596d1768e2d71bffd6e858b60 (diff) | |
| download | tmus-440e88cfbbc2f24ca0fa22c448d597e751d49dc2.tar.gz tmus-440e88cfbbc2f24ca0fa22c448d597e751d49dc2.zip | |
Fix tag_rename selection
Diffstat (limited to 'src')
| -rw-r--r-- | src/data.c | 7 | ||||
| -rw-r--r-- | src/tui.c | 2 |
2 files changed, 6 insertions, 3 deletions
@@ -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); @@ -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); |
