[tracker/tracker-0.12] tracker-extract, msoffice: Add debugging aid for when opening file fails
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/tracker-0.12] tracker-extract, msoffice: Add debugging aid for when opening file fails
- Date: Wed, 15 Feb 2012 15:13:30 +0000 (UTC)
commit 6171390b8c70802a0594abb55bfa3d4975e1b3cb
Author: Philip Van Hoof <philip codeminded be>
Date: Tue Jan 3 10:57:33 2012 +0100
tracker-extract, msoffice: Add debugging aid for when opening file fails
Related: NB#296009.
src/tracker-extract/tracker-extract-msoffice.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-msoffice.c b/src/tracker-extract/tracker-extract-msoffice.c
index a1b83de..03a3b0b 100644
--- a/src/tracker-extract/tracker-extract-msoffice.c
+++ b/src/tracker-extract/tracker-extract-msoffice.c
@@ -752,6 +752,7 @@ open_file (const gchar *filename, FILE *file)
{
GsfInput *input;
GsfInfile *infile;
+ GError *error = NULL;
input = gsf_input_stdio_new_FILE (filename, file, TRUE);
@@ -759,7 +760,13 @@ open_file (const gchar *filename, FILE *file)
return NULL;
}
- infile = gsf_infile_msole_new (input, NULL);
+ infile = gsf_infile_msole_new (input, &error);
+
+ if (error) {
+ g_warning ("Failed to open file: %s", error->message);
+ g_error_free (error);
+ }
+
g_object_unref (input);
return infile;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]