g_list_find() only compares the pointer and not the filename it points
to, use g_list_find_custom() with g_strcmp0() to actually check for the
filename.
Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
Signed-off-by: Guilhem Bonnefille <guilhem.bonnefille@gmail.com>
{
gboolean locked = FALSE;
g_mutex_lock(file_list_mutex);
- if (g_list_find(file_list, fn) == NULL)
+ if (g_list_find_custom(file_list, fn, g_strcmp0) == NULL)
{
// The filename is not yet locked
file_list = g_list_append(file_list, (gpointer)fn),