#endif
#include <string.h>
+
#include <gio/gio.h>
#include <glib/gstdio.h>
#include <glib/gi18n.h>
size_read = g_input_stream_read (G_INPUT_STREAM (input_stream),
buffer, 1024, NULL, NULL);
- g_input_stream_close (G_INPUT_STREAM (input_stream), NULL, NULL);
+ g_input_stream_close (G_INPUT_STREAM (input_stream), NULL, error);
g_object_unref (file);
if (mime_type == NULL) {
g_free (mime_type);
+
+ if (*error == NULL) {
+ g_set_error (error,
+ EV_DOCUMENT_ERROR,
+ 0,
+ _("Unknown MIME Type"));
+ }
return NULL;
}