gegl r2177 - in trunk: . gegl/buffer
- From: ok svn gnome org
- To: svn-commits-list gnome org
- Subject: gegl r2177 - in trunk: . gegl/buffer
- Date: Wed, 16 Apr 2008 01:07:30 +0100 (BST)
Author: ok
Date: Wed Apr 16 01:07:29 2008
New Revision: 2177
URL: http://svn.gnome.org/viewvc/gegl?rev=2177&view=rev
Log:
* gegl/buffer/gegl-tile-gio.c: (finalize): fixed code to nuke
buffer dir and tile files.
Modified:
trunk/ChangeLog
trunk/gegl/buffer/gegl-tile-gio.c
Modified: trunk/gegl/buffer/gegl-tile-gio.c
==============================================================================
--- trunk/gegl/buffer/gegl-tile-gio.c (original)
+++ trunk/gegl/buffer/gegl-tile-gio.c Wed Apr 16 01:07:29 2008
@@ -335,6 +335,30 @@
finalize (GObject *object)
{
GeglTileGio *self = (GeglTileGio *) object;
+ GFileEnumerator *enumerator;
+ GFileInfo *info;
+
+ enumerator = g_file_enumerate_children (self->buffer_dir, "standard::*",
+ G_FILE_QUERY_INFO_NONE, NULL, NULL);
+
+ for (info = g_file_enumerator_next_file (enumerator, NULL, NULL);
+ info;
+ info = g_file_enumerator_next_file (enumerator, NULL, NULL))
+ {
+ const gchar *name = g_file_info_get_name (info);
+ if (name)
+ {
+ GFile *file = g_file_get_child (self->buffer_dir, name);
+ if (file)
+ {
+ g_file_delete (file, NULL, NULL);
+ g_object_unref (file);
+ }
+ }
+ g_object_unref (info);
+ }
+
+ g_object_unref (enumerator);
g_file_delete (self->buffer_dir, NULL, NULL);
g_object_unref (self->buffer_dir);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]