https://github.com/BestImageViewer/geeqie/issues/460
Ensure the duplicates lists do not contain more than one entry for each
physical file
if (!di) return;
+ /* Ensure images in the lists have unique FileDatas */
+ GList *work;
+ DupeItem *di_list;
+ work = g_list_first(dw->list);
+ while (work)
+ {
+ di_list = work->data;
+ if (di_list->fd == di->fd)
+ {
+ return;
+ }
+ else
+ {
+ work = work->next;
+ }
+ }
+
+ if (dw->second_list)
+ {
+ work = g_list_first(dw->second_list);
+ while (work)
+ {
+ di_list = work->data;
+ if (di_list->fd == di->fd)
+ {
+ return;
+ }
+ else
+ {
+ work = work->next;
+ }
+ }
+ }
+
if (dw->second_drop)
{
dupe_second_add(dw, di);