[brasero: 2/6] Fix bgo #579023 – No error message when attempting to burn on incorrect medium



commit dd4ca95647c837875741e78e453ed96cd4b5c610
Author: Philippe Rouquier <bonfire-app wanadoo fr>
Date:   Mon May 11 12:50:09 2009 +0200

    Fix bgo #579023 â?? No error message when attempting to burn on incorrect medium
    Set a deferred error that will be used if wodim or cdrecord returns with an error without a proper error.
---
 plugins/cdrkit/burn-wodim.c      |   18 ++++++++++++++++--
 plugins/cdrtools/burn-cdrecord.c |   17 ++++++++++++++++-
 2 files changed, 32 insertions(+), 3 deletions(-)

diff --git a/plugins/cdrkit/burn-wodim.c b/plugins/cdrkit/burn-wodim.c
index fc09dba..3033310 100644
--- a/plugins/cdrkit/burn-wodim.c
+++ b/plugins/cdrkit/burn-wodim.c
@@ -133,7 +133,13 @@ brasero_wodim_stderr_read (BraseroProcess *process, const gchar *line)
 						BRASERO_BURN_ERROR_DRIVE_BUSY,
 						_("The drive is busy")));
 	}
-
+	else if (strstr (line, "Probably trying to use ultra high speed+ medium on improper writer")) {
+		/* Set a deferred error as this message tends to indicate a failure */
+		brasero_process_deferred_error (process,
+						g_error_new (BRASERO_BURN_ERROR,
+							     BRASERO_BURN_ERROR_MEDIUM_INVALID,
+							     _("The disc is not supported")));
+	}
 	/* REMINDER: these should not be necessary as we checked that already */
 	/**
 	else if (strstr (line, "cannot write medium - incompatible format") != NULL) {
@@ -361,10 +367,18 @@ brasero_wodim_stdout_read (BraseroProcess *process, const gchar *line)
 	else if (g_str_has_prefix (line, "Last chance to quit, ")) {
 		brasero_job_set_dangerous (BRASERO_JOB (process), TRUE);
 	}
-	else if (g_str_has_prefix (line, "Blanking PMA, TOC, pregap")
+/*	else if (g_str_has_prefix (line, "Blanking PMA, TOC, pregap")
 	     ||  strstr (line, "Blanking entire disk")) {
 
 	}
+ */
+	else if (strstr (line, "Disk sub type: Ultra High speed+")) {
+		/* Set a deferred error as this message tends to indicate a failure */
+		brasero_process_deferred_error (process,
+						g_error_new (BRASERO_BURN_ERROR,
+							     BRASERO_BURN_ERROR_MEDIUM_INVALID,
+							     _("The disc is not supported")));
+	}
 	/* This should not happen */
 	/* else if (strstr (line, "Use tsize= option in SAO mode to specify track size")) */
 
diff --git a/plugins/cdrtools/burn-cdrecord.c b/plugins/cdrtools/burn-cdrecord.c
index 86b49f6..ff9133f 100644
--- a/plugins/cdrtools/burn-cdrecord.c
+++ b/plugins/cdrtools/burn-cdrecord.c
@@ -133,6 +133,13 @@ brasero_cdrecord_stderr_read (BraseroProcess *process, const gchar *line)
 						BRASERO_BURN_ERROR_DRIVE_BUSY,
 						_("The drive is busy")));
 	}
+	else if (strstr (line, "Probably trying to use ultra high speed+ medium on improper writer")) {
+		/* Set a deferred error as this message tends to indicate a failure */
+		brasero_process_deferred_error (process,
+						g_error_new (BRASERO_BURN_ERROR,
+							     BRASERO_BURN_ERROR_MEDIUM_INVALID,
+							     _("The disc is not supported")));
+	}
 
 	/* REMINDER: these should not be necessary as we checked that already */
 	/**
@@ -345,10 +352,18 @@ brasero_cdrecord_stdout_read (BraseroProcess *process, const gchar *line)
 	else if (g_str_has_prefix (line, "Last chance to quit, ")) {
 		brasero_job_set_dangerous (BRASERO_JOB (process), TRUE);
 	}
-	else if (g_str_has_prefix (line, "Blanking PMA, TOC, pregap")
+/*	else if (g_str_has_prefix (line, "Blanking PMA, TOC, pregap")
 	     ||  strstr (line, "Blanking entire disk")) {
 
 	}
+*/
+	else if (strstr (line, "Disk sub type: Ultra High speed+")) {
+		/* Set a deferred error as this message tends to indicate a failure */
+		brasero_process_deferred_error (process,
+						g_error_new (BRASERO_BURN_ERROR,
+							     BRASERO_BURN_ERROR_MEDIUM_INVALID,
+							     _("The disc is not supported")));
+	}
 	/* This should not happen */
 	/* else if (strstr (line, "Use tsize= option in SAO mode to specify track size")) */
 



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