$NetBSD: patch-aa,v 1.7 2005/05/19 21:14:11 jmmv Exp $ --- libseahorse/seahorse-util.c.orig 2005-05-01 19:30:09.000000000 +0000 +++ libseahorse/seahorse-util.c @@ -230,11 +230,12 @@ seahorse_util_write_data_to_file (const gchar *buffer; gint nread; - /* - * TODO: gpgme_data_seek doesn't work for us right now - * probably because of different off_t sizes - */ - gpgme_data_rewind (data); + /* Reset the read pointer in data */ + if (gpgme_data_seek (data, 0, SEEK_SET) == -1) + { + gpg_err_code_t e = gpg_err_code_from_errno (errno); + return GPG_E (e); + } file = seahorse_vfs_data_create (path, SEAHORSE_VFS_WRITE, &err); if (file != NULL) { @@ -275,11 +276,11 @@ seahorse_util_write_data_to_text (gpgme_ guint nread = 0; GString *string; - /* - * TODO: gpgme_data_seek doesn't work for us right now - * probably because of different off_t sizes - */ - gpgme_data_rewind (data); + /* Reset the read pointer in data */ + if (gpgme_data_seek (data, 0, SEEK_SET) == -1) + { + return NULL; + } string = g_string_new (""); buffer = g_new (gchar, size);