(Windows) Fix core path entries in image/video/music history playlists

This commit is contained in:
twinaphex 2020-06-08 17:33:21 +02:00
parent fc491e9ea4
commit 12b22b7904
2 changed files with 11 additions and 6 deletions

View File

@ -2150,7 +2150,7 @@ static int action_ok_playlist_entry_collection(const char *path,
* then copy the path without modification
* > If this is a standard core, ensure
* it has a corresponding core info entry */
if (string_is_equal(entry->core_path, "builtin"))
if (string_ends_with(entry->core_path, "builtin"))
{
strlcpy(core_path, entry->core_path, sizeof(core_path));
core_is_builtin = true;

View File

@ -204,7 +204,8 @@ static bool playlist_core_path_equal(const char *real_core_path, const char *ent
/* Get entry 'real' core path */
strlcpy(entry_real_core_path, entry_core_path, sizeof(entry_real_core_path));
if (!string_is_equal(entry_real_core_path, "DETECT"))
if (!string_is_equal(entry_real_core_path, "DETECT") &&
!string_is_equal(entry_real_core_path, "builtin"))
path_resolve_realpath(entry_real_core_path, sizeof(entry_real_core_path), true);
if (string_is_empty(entry_real_core_path))
@ -635,7 +636,8 @@ bool playlist_push_runtime(playlist_t *playlist,
/* Get 'real' core path */
strlcpy(real_core_path, entry->core_path, sizeof(real_core_path));
if (!string_is_equal(real_core_path, "DETECT"))
if (!string_is_equal(real_core_path, "DETECT") &&
!string_is_equal(real_core_path, "builtin"))
path_resolve_realpath(real_core_path, sizeof(real_core_path), true);
if (string_is_empty(real_core_path))
@ -805,7 +807,8 @@ bool playlist_push(playlist_t *playlist,
/* Get 'real' core path */
strlcpy(real_core_path, entry->core_path, sizeof(real_core_path));
if (!string_is_equal(real_core_path, "DETECT"))
if (!string_is_equal(real_core_path, "DETECT") &&
!string_is_equal(real_core_path, "builtin"))
playlist_resolve_path(PLAYLIST_SAVE, real_core_path, sizeof(real_core_path));
if (string_is_empty(real_core_path))
@ -2708,7 +2711,8 @@ bool playlist_entries_are_equal(
if (!string_is_empty(entry_a->core_path))
{
strlcpy(real_core_path_a, entry_a->core_path, sizeof(real_core_path_a));
if (!string_is_equal(real_core_path_a, "DETECT"))
if (!string_is_equal(real_core_path_a, "DETECT") &&
!string_is_equal(real_core_path_a, "builtin"))
path_resolve_realpath(real_core_path_a, sizeof(real_core_path_a), true);
}
@ -2806,7 +2810,8 @@ void playlist_set_default_core_path(playlist_t *playlist, const char *core_path)
/* Get 'real' core path */
strlcpy(real_core_path, core_path, sizeof(real_core_path));
if (!string_is_equal(real_core_path, "DETECT"))
if (!string_is_equal(real_core_path, "DETECT") &&
!string_is_equal(real_core_path, "builtin"))
playlist_resolve_path(PLAYLIST_SAVE,
real_core_path, sizeof(real_core_path));