On Windows builds, don't use case sensitive path comparisons when pushing to a playlist.

This commit is contained in:
David Walters 2017-12-08 23:50:00 +00:00
parent 004c1d2f0a
commit deb017e17f

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. */