[gegl] buffer: Fix double opening of input stream in file tile backend



commit d5133d23a9819b06a511f0f1f63ab0351f3344dc
Author: �yvind Kolås <pippin gimp org>
Date:   Wed Dec 2 20:58:23 2009 +0000

    buffer: Fix double opening of input stream in file tile backend
    
    Also re-arranged ifdef guards for compiling without GIO (still kept as
    it might be relevant for mmaping tiles directly. )

 gegl/buffer/gegl-tile-backend-file.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gegl/buffer/gegl-tile-backend-file.c b/gegl/buffer/gegl-tile-backend-file.c
index 061897a..1e868bc 100644
--- a/gegl/buffer/gegl-tile-backend-file.c
+++ b/gegl/buffer/gegl-tile-backend-file.c
@@ -974,15 +974,16 @@ gegl_tile_backend_file_ensure_exist (GeglTileBackendFile *self)
   if (!self->exist)
     {
       GeglTileBackend *backend;
+#if HAVE_GIO
       GError *error = NULL;
 
-      self->exist = TRUE;
-
       if (self->io)
         {
           g_print ("we already existed\n");
           return;
         }
+#endif
+      self->exist = TRUE;
 
       backend = GEGL_TILE_BACKEND (self);
 
@@ -1021,7 +1022,6 @@ gegl_tile_backend_file_ensure_exist (GeglTileBackendFile *self)
       gegl_tile_backend_file_write_header (self);
 #if HAVE_GIO
       g_output_stream_flush (self->o, NULL, NULL);
-      self->i = G_INPUT_STREAM (g_file_read (self->file, NULL, NULL));
 #else
       fsync (self->o);
       self->i = dup (self->o);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]