[file-roller/bug-588547] added debug instructions to fix bug #588547



commit 981e38cb361e6d0b79268501c14f8a62f4fecaf4
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Wed Jul 15 17:39:32 2009 +0200

    added debug instructions to fix bug #588547

 src/fr-command-7z.c |   26 ++++++++++++++++++++++++--
 1 files changed, 24 insertions(+), 2 deletions(-)
---
diff --git a/src/fr-command-7z.c b/src/fr-command-7z.c
index b1cb445..9be2b6c 100644
--- a/src/fr-command-7z.c
+++ b/src/fr-command-7z.c
@@ -464,17 +464,24 @@ static void
 fr_command_7z_handle_error (FrCommand   *comm,
 			    FrProcError *error)
 {
+g_print ("[1]\n");
 	if (error->type == FR_PROC_ERROR_NONE) {
 		FileData *first;
 		char     *basename;
 		char     *testname;
 
+g_print ("[2]\n");
+
 		/* This is a way to fix bug #582712. */
 
-		if (comm->files->len != 1)
+		if (comm->files->len != 1) {
+g_print ("[2-1]\n");
 			return;
-		if (! g_str_has_suffix (comm->filename, ".001"))
+		}
+		if (! g_str_has_suffix (comm->filename, ".001")) {
+g_print ("[2-2]\n");
 			return;
+		}
 
 		first = g_ptr_array_index (comm->files, 0);
 		basename = g_path_get_basename (comm->filename);
@@ -486,29 +493,44 @@ fr_command_7z_handle_error (FrCommand   *comm,
 		g_free (testname);
 		g_free (basename);
 
+g_print ("[2-3]\n");
+
 		return;
 	}
 
+g_print ("[3]\n");
+
 	if (error->type != FR_PROC_ERROR_COMMAND_ERROR)
 		return;
 
+g_print ("[4]\n");
+
 	if (error->status <= 1) {
+
+g_print ("[5]\n");
+
 		error->type = FR_PROC_ERROR_NONE;
 	}
 	else {
 		GList *scan;
 
+g_print ("[6]\n");
+
 		for (scan = g_list_last (comm->process->out.raw); scan; scan = scan->prev) {
 			char *line = scan->data;
 
 			if ((strstr (line, "Wrong password?") != NULL)
 			    || (strstr (line, "Enter password") != NULL))
 			{
+
+g_print ("[7]\n");
 				error->type = FR_PROC_ERROR_ASK_PASSWORD;
 				break;
 			}
 		}
 	}
+g_print ("[8]\n");
+
 }
 
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]