[Xfce4-commits] r25506 - squeeze/trunk/libsqueeze
Stephan Arts
stephan at xfce.org
Tue Apr 10 00:32:44 CEST 2007
Author: stephan
Date: 2007-04-09 22:32:44 +0000 (Mon, 09 Apr 2007)
New Revision: 25506
Modified:
squeeze/trunk/libsqueeze/archive-iter.c
squeeze/trunk/libsqueeze/command-builder-gnu-tar.c
Log:
remove some debugging info and fix bug 3103
Modified: squeeze/trunk/libsqueeze/archive-iter.c
===================================================================
--- squeeze/trunk/libsqueeze/archive-iter.c 2007-04-09 22:15:43 UTC (rev 25505)
+++ squeeze/trunk/libsqueeze/archive-iter.c 2007-04-09 22:32:44 UTC (rev 25506)
@@ -424,9 +424,6 @@
lsq_archive_iter_pool_remove_iter(iter->archive->pool, iter);
- const gchar *filename = lsq_archive_entry_get_filename(iter->entry);
- g_debug("%s: %s", __FUNCTION__, filename);
-
/* free the entry if it doesn't exist */
if(!lsq_archive_iter_is_real(iter))
lsq_archive_entry_free(iter->archive, iter->entry);
Modified: squeeze/trunk/libsqueeze/command-builder-gnu-tar.c
===================================================================
--- squeeze/trunk/libsqueeze/command-builder-gnu-tar.c 2007-04-09 22:15:43 UTC (rev 25505)
+++ squeeze/trunk/libsqueeze/command-builder-gnu-tar.c 2007-04-09 22:32:44 UTC (rev 25506)
@@ -54,6 +54,9 @@
static gboolean
lsq_command_builder_gnu_tar_decompress_parse_output(LSQSpawnCommand *spawn_command, gpointer user_data);
+static gboolean
+lsq_command_builder_gnu_tar_cleanup(LSQArchiveCommand *command);
+
static GObjectClass *parent_class;
GType
@@ -281,6 +284,10 @@
{
lsq_macro_command_append(LSQ_MACRO_COMMAND(add_macro), compress);
g_object_unref(compress);
+ LSQArchiveCommand *cleanup = lsq_archive_command_new(_("Cleanup"), archive, lsq_command_builder_gnu_tar_cleanup);
+ g_object_set_data(G_OBJECT(cleanup), LSQ_ARCHIVE_TEMP_FILE, tmp_file);
+ lsq_macro_command_append(LSQ_MACRO_COMMAND(add_macro), cleanup);
+ g_object_unref(cleanup);
}
@@ -341,6 +348,11 @@
lsq_macro_command_append(LSQ_MACRO_COMMAND(remove_macro), remove);
g_object_unref(remove);
+ LSQArchiveCommand *cleanup = lsq_archive_command_new(_("Cleanup"), archive, lsq_command_builder_gnu_tar_cleanup);
+ g_object_set_data(G_OBJECT(cleanup), LSQ_ARCHIVE_TEMP_FILE, tmp_file);
+ lsq_macro_command_append(LSQ_MACRO_COMMAND(remove_macro), cleanup);
+ g_object_unref(cleanup);
+
if(!lsq_spawn_command_set_parse_func(LSQ_SPAWN_COMMAND(compress), 1, lsq_command_builder_gnu_tar_compress_parse_output, NULL))
{
g_critical("Could not set compress parse function");
@@ -583,6 +595,17 @@
return TRUE;
}
+static gboolean
+lsq_command_builder_gnu_tar_cleanup(LSQArchiveCommand *command)
+{
+ const gchar *tmp_file = g_object_get_data(G_OBJECT(command), LSQ_ARCHIVE_TEMP_FILE);
+ if(tmp_file)
+ g_unlink(tmp_file);
+ g_object_set_data(G_OBJECT(command), LSQ_ARCHIVE_TEMP_FILE, NULL);
+
+ return TRUE;
+}
+
LSQCommandBuilder *
lsq_command_builder_gnu_tar_new()
{
More information about the Xfce4-commits
mailing list