/*
* Geeqie
* (C) 2004 John Ellis
- * Copyright (C) 2008 - 2010 The Geeqie Team
+ * Copyright (C) 2008 - 2012 The Geeqie Team
*
* Author: John Ellis
*
if (!flush)
changed |= collect_manager_process_action(entry, &buf);
- valid = (buf[0] == G_DIR_SEPARATOR && collection_add_check(cd, file_data_new_simple(buf), FALSE, TRUE));
+ valid = (buf[0] == G_DIR_SEPARATOR && collection_add_check(cd, file_data_new_group(buf), FALSE, TRUE));
if (!valid) DEBUG_1("collection invalid file: %s", buf);
total++;
gchar *buf = NULL;
while (collect_manager_process_action(entry, &buf))
{
- collection_add_check(cd, file_data_new_simple(buf), FALSE, TRUE);
+ collection_add_check(cd, file_data_new_group(buf), FALSE, TRUE);
changed = TRUE;
g_free(buf);
buf = NULL;
collect_manager_action_unref(action);
}
g_list_free(entry->add_list);
- g_hash_table_destroy(entry->oldpath_hash);
- g_hash_table_destroy(entry->newpath_hash);
+ if (g_hash_table_size(entry->oldpath_hash) > 0)
+ g_hash_table_destroy(entry->oldpath_hash);
+ else
+ g_hash_table_unref(entry->oldpath_hash);
+ if (g_hash_table_size(entry->newpath_hash) > 0)
+ g_hash_table_destroy(entry->newpath_hash);
+ else
+ g_hash_table_unref(entry->newpath_hash);
}
static void collect_manager_entry_init_data(CollectManagerEntry *entry)
else
{
collect_manager_entry_free(entry);
+
+ entry = NULL;
}
}
}
static void collect_manager_process_actions(gint max)
{
if (collection_manager_action_list) DEBUG_1("collection manager processing actions");
-
+
while (collection_manager_action_list != NULL && max > 0)
{
CollectManagerAction *action;
static gboolean collect_manager_process_entry(CollectManagerEntry *entry)
{
CollectionData *cd;
- gboolean success;
if (entry->empty) return FALSE;
cd = collection_new(entry->path);
- success = collection_load_private(cd, entry->path, COLLECTION_LOAD_NONE);
+ (void) collection_load_private(cd, entry->path, COLLECTION_LOAD_NONE);
collection_unref(cd);
void collect_manager_notify_cb(FileData *fd, NotifyType type, gpointer data)
{
if (!(type & NOTIFY_CHANGE) || !fd->change) return;
-
+
DEBUG_1("Notify collect_manager: %s %04x", fd->path, type);
switch (fd->change->type)
{