Issue error message if spreadsheet does not exist
authorJohn Darrington <john@darrington.wattle.id.au>
Mon, 25 Feb 2013 10:25:12 +0000 (11:25 +0100)
committerJohn Darrington <john@darrington.wattle.id.au>
Mon, 25 Feb 2013 10:25:12 +0000 (11:25 +0100)
src/data/ods-reader.c

index 7c12af221562a00749738e05341b1f6dec366eed..07eef74563a7f8e33ca073d805a9fc3bd66b2a33 100644 (file)
@@ -539,7 +539,14 @@ ods_probe (const char *filename, bool report_errors)
   struct zip_reader *zr = zip_reader_create (filename, &errs);
 
   if (zr == NULL)
-    return NULL;
+    {
+      if (report_errors)
+       {
+         msg (ME, _("Cannot open %s as a OpenDocument file: %s"),
+              filename, ds_cstr (&errs));
+       }
+      return NULL;
+    }
 
   sheet_count = get_sheet_count (zr);