add_file (GCabFolder *self, GCabFile *file, GError **error)
{
    if (g_hash_table_lookup (self->hash, (gpointer)gcab_file_get_name (file))) {
        g_set_error (error, GCAB_ERROR, GCAB_ERROR_FORMAT,
                     "File '%s' has already been added", gcab_file_get_name (file));
        return FALSE;
    }

    g_hash_table_insert (self->hash,
                         (gpointer)gcab_file_get_name (file), g_object_ref (file));
    self->files = g_slist_prepend (self->files, g_object_ref (file));

    return TRUE;
}
add_file (GCabFolder *self, GCabFile *file, GError **error)
{
    if (g_hash_table_lookup (self->hash, (gpointer)gcab_file_get_name (file))) {
        g_set_error (error, GCAB_ERROR, GCAB_ERROR_FORMAT,
                     "File '%s' has already been added", gcab_file_get_name (file));
        return FALSE;
    }

    g_hash_table_insert (self->hash,
                         (gpointer)gcab_file_get_name (file), g_object_ref (file));
    self->files = g_slist_prepend (self->files, g_object_ref (file));

    return TRUE;
}