[gthumb/gthumb-2-14] use a better error message when the catalog already exists
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb/gthumb-2-14] use a better error message when the catalog already exists
- Date: Sun, 11 Dec 2011 17:06:25 +0000 (UTC)
commit 11941d1b46c9d1cf438419cb044e1a8b6b5051b2
Author: Paolo Bacchilega <paobac src gnome org>
Date: Sun Dec 11 18:01:51 2011 +0100
use a better error message when the catalog already exists
extensions/catalogs/gth-file-source-catalogs.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/extensions/catalogs/gth-file-source-catalogs.c b/extensions/catalogs/gth-file-source-catalogs.c
index 6acab44..0d4b8ef 100644
--- a/extensions/catalogs/gth-file-source-catalogs.c
+++ b/extensions/catalogs/gth-file-source-catalogs.c
@@ -498,10 +498,15 @@ gth_file_source_catalogs_rename (GthFileSource *file_source,
}
}
+ if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_EXISTS)) {
+ g_clear_error (&error);
+ error = g_error_new_literal (G_IO_ERROR, G_IO_ERROR_EXISTS, _("Name already used"));
+ }
+
object_ready_with_error (file_source, callback, data, error);
_g_object_unref (new_file);
- g_object_unref (catalog);
+ _g_object_unref (catalog);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]