[Pkg-privacy-commits] [nautilus-wipe] 45/224: Better error message when child spawn fails
Ulrike Uhlig
u-guest at moszumanska.debian.org
Thu Jul 7 19:45:33 UTC 2016
This is an automated email from the git hooks/post-receive script.
u-guest pushed a commit to branch master
in repository nautilus-wipe.
commit 0ad7157cdf9bfb56cbbfa54a9b4df32fa46f6348
Author: Colomban Wendling <ban at herbesfolles.org>
Date: Sun Feb 21 22:24:36 2010 +0100
Better error message when child spawn fails
Suggest to install secure-delete package if the child process cannot
be found, which is likely to be caused by the absence of the tool.
---
nautilus-srm/operation-manager.c | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/nautilus-srm/operation-manager.c b/nautilus-srm/operation-manager.c
index 1453c93..c7e610b 100644
--- a/nautilus-srm/operation-manager.c
+++ b/nautilus-srm/operation-manager.c
@@ -27,6 +27,7 @@
#include <gtk/gtk.h>
#include <gsecuredelete/gsecuredelete.h>
+#include "nautilus-srm.h"
#include "progress-dialog.h"
@@ -229,7 +230,20 @@ nautilus_srm_operation_manager_run (GtkWindow *parent,
G_CALLBACK (operation_finished_handler),
G_CALLBACK (operation_progress_handler),
opdata, &err)) {
- display_operation_error (opdata, err->message);
+ if (err->code == G_SPAWN_ERROR_NOENT) {
+ gchar *message;
+
+ /* Merge the error message with our. Pretty much a hack, but should be
+ * correct and more precise. */
+ message = g_strdup_printf (_("%s. "
+ "Please make sure you have the secure-delete "
+ "package properly installed on your system."),
+ err->message);
+ display_operation_error (opdata, message);
+ g_free (message);
+ } else {
+ display_operation_error (opdata, err->message);
+ }
g_error_free (err);
gtk_widget_destroy (GTK_WIDGET (opdata->progress_dialog));
free_opdata (opdata);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/nautilus-wipe.git
More information about the Pkg-privacy-commits
mailing list