- GList *group_list = NULL;
-
- /* check for possible sidecar files;
- the sidecar files created here are referenced only via fd->sidecar_files or fd->parent,
- they have fd->ref set to 0 and file_data unref must chack and free them all together
- (using fd->ref would cause loops and leaks)
- */
-
- /* find all possible sidecar files and order them according to sidecar_ext_get_list,
- for case-only differences put lowercase first,
- put the result to group_list
- */
- work = sidecar_ext_get_list();
+ FileData *parent_fd;
+ if (!basename_list) return;
+ /* process the group list - the first one is the parent file, others are sidecars */
+ parent_fd = basename_list->data;
+ work = basename_list->next;