• Ell's avatar
    buffer: improve handling of dynamically-changing swap dir · b61f9015
    Ell authored
    The current swap-dir management code doesn't cope well with
    programs that modify the swap dir after initialization, which is
    what GIMP is now doing (see issue gimp#2224.)
    
    Move all the swap-dir management code to a new gegl-buffer-swap.c
    file, and have gegl-init.c and gegl-buffer-config.c configure the
    swap through this file.
    
    The new file provides two new public functions:
    gegl_buffer_swap_create_file(), which returns a unique filename for
    a swap file in the current swap dir, and
    gegl_buffer_swap_remove_file(), which removes and deletes a
    previously-created swap file.  All swap files created with
    create_file(), which hasn't been explicitly removed with
    remove_file(), are automatically deleted on shutdown.  This allows
    swap files to be safely deleted, even if the swap dir has been
    changed since their creation.
    
    Deprecate gegl_tile_backend_unlink_swap() in favor of the new
    functions.
    
    Use gegl_buffer_swap_{create,remove}_file() in the swap backend.
    b61f9015
gegl-config.c 10.3 KB