History

playlist: fix setting current item with autocreate-playlist

when the current directory isn't the playlist directory.

llyyr committed 2 years ago

Commit 92f052c1 parent b6f05991 file · +1 −1Browse files

Unified · Split

common/playlist.c+1−1
@@ -446,7 +446,7 @@ void playlist_set_current(struct playlist *pl) · 445 unmodified lines
446446 continue;
447447 char *path = pl->entries[i]->playlist_path;
448448 if (path[0] != '.')
449− path = mp_path_join(NULL, pl->playlist_dir, pl->entries[i]->playlist_path);
449+ path = mp_path_join(NULL, pl->playlist_dir, mp_basename(pl->entries[i]->playlist_path));
450450 bool same = !strcmp(pl->entries[i]->filename, path);
451451 if (path != pl->entries[i]->playlist_path)
452452 talloc_free(path);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t