libarchive_read_close_cb (struct archive *ar_read,
                          void           *client_data)
{
  AutoarExtractor *self;

  g_debug ("libarchive_read_close_cb: called");

  self = AUTOAR_EXTRACTOR (client_data);

  if (self->error != NULL)
    return ARCHIVE_FATAL;

  if (self->istream != NULL) {
    g_input_stream_close (self->istream, self->cancellable, NULL);
    g_object_unref (self->istream);
    self->istream = NULL;
  }

  g_debug ("libarchive_read_close_cb: ARCHIVE_OK");
  return ARCHIVE_OK;
}
libarchive_read_close_cb (struct archive *ar_read,
                          void           *client_data)
{
  AutoarExtractor *self;

  g_debug ("libarchive_read_close_cb: called");

  self = AUTOAR_EXTRACTOR (client_data);

  if (self->error != NULL)
    return ARCHIVE_FATAL;

  if (self->istream != NULL) {
    g_input_stream_close (self->istream, self->cancellable, NULL);
    g_object_unref (self->istream);
    self->istream = NULL;
  }

  g_debug ("libarchive_read_close_cb: ARCHIVE_OK");
  return ARCHIVE_OK;
}