Merge pull request #5889 from hiddenasbestos/relpath_dup_fix

Playlist duplication fixes
This commit is contained in:
Twinaphex 2017-12-09 01:03:30 +01:00 committed by GitHub
commit 22d8d35721
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 3 deletions

View File

@ -309,9 +309,17 @@ bool playlist_push(playlist_t *playlist,
for (i = 0; i < playlist->size; i++)
{
struct playlist_entry tmp;
bool equal_path = (!path && !playlist->entries[i].path) ||
bool equal_path;
equal_path = (!path && !playlist->entries[i].path) ||
(path && playlist->entries[i].path &&
string_is_equal(path,playlist->entries[i].path));
#ifdef _WIN32
/*prevent duplicates on case-insensitive operating systems*/
string_is_equal_noncase(path,playlist->entries[i].path)
#else
string_is_equal(path,playlist->entries[i].path)
#endif
);
/* Core name can have changed while still being the same core.
* Differentiate based on the core path only. */

View File

@ -996,7 +996,7 @@ static bool command_event_cmd_exec(const char *data,
#if defined(HAVE_DYNAMIC)
if (!task_load_content(&content_info, content_ctx,
false, launched_from_cli, error_string))
true, launched_from_cli, error_string))
return false;
#else
frontend_driver_set_fork(FRONTEND_FORK_CORE_WITH_ARGS);