From 92f052c14e994b7ea77dc370b01bed5f8ef546db Mon Sep 17 00:00:00 2001 From: llyyr Date: Fri, 23 Aug 2024 04:13:38 +0530 Subject: [PATCH] playlist: fix setting current item with autocreate-playlist when the current directory isn't the playlist directory. --- common/playlist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/playlist.c b/common/playlist.c index e5381fffc2..f4950c1ab2 100644 --- a/common/playlist.c +++ b/common/playlist.c @@ -446,7 +446,7 @@ void playlist_set_current(struct playlist *pl) continue; char *path = pl->entries[i]->playlist_path; if (path[0] != '.') - path = mp_path_join(NULL, pl->playlist_dir, pl->entries[i]->playlist_path); + path = mp_path_join(NULL, pl->playlist_dir, mp_basename(pl->entries[i]->playlist_path)); bool same = !strcmp(pl->entries[i]->filename, path); if (path != pl->entries[i]->playlist_path) talloc_free(path);