gthumb r2397 - in trunk: . libgthumb
- From: mjc svn gnome org
- To: svn-commits-list gnome org
- Subject: gthumb r2397 - in trunk: . libgthumb
- Date: Tue, 12 Aug 2008 18:22:32 +0000 (UTC)
Author: mjc
Date: Tue Aug 12 18:22:32 2008
New Revision: 2397
URL: http://svn.gnome.org/viewvc/gthumb?rev=2397&view=rev
Log:
2008-08-12 Michael J. Chudobiak <mjc svn gnome org>
* libgthumb/bookmarks.c: (bookmarks_load_from_disk),
(bookmarks_write_to_disk):
Added better error reporting.
Modified:
trunk/ChangeLog
trunk/libgthumb/bookmarks.c
Modified: trunk/libgthumb/bookmarks.c
==============================================================================
--- trunk/libgthumb/bookmarks.c (original)
+++ trunk/libgthumb/bookmarks.c Tue Aug 12 18:22:32 2008
@@ -318,7 +318,7 @@
istream = g_file_read (gfile, NULL, &error);
if (error != NULL) {
- gfile_warning ("Cannot load bookmark file",
+ gfile_warning ("Cannot open bookmark file for reading",
gfile,
error);
g_error_free (error);
@@ -345,6 +345,11 @@
get_menu_item_tip (path));
}
+ if (error) {
+ gfile_warning ("Error reading line from bookmark file", gfile, error);
+ g_error_free (error);
+ }
+
g_object_unref (dstream);
g_object_unref (istream);
g_object_unref (gfile);
@@ -375,7 +380,7 @@
ostream = g_file_replace (gfile, NULL, FALSE, G_FILE_CREATE_NONE, NULL, &error);
if (error) {
- gfile_warning ("Cannot write to bookmark file",
+ gfile_warning ("Cannot open bookmark file for writing",
gfile,
error);
g_error_free (error);
@@ -394,14 +399,19 @@
gfile_warning ("Cannot write line to bookmark file",
gfile,
error);
- g_error_free (error);
+ g_clear_error (&error);
break;
}
lines++;
scan = scan->next;
}
- g_output_stream_close (G_OUTPUT_STREAM(ostream), NULL, NULL);
+ g_output_stream_close (G_OUTPUT_STREAM(ostream), NULL, &error);
+ if (error) {
+ gfile_warning ("Cannot close bookmark file", gfile, error);
+ g_error_free (error);
+ }
+
g_object_unref (ostream);
g_object_unref (gfile);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]