[brasero] Reprobe the drive contents after every blank operation



commit 39451314bf6f72d0ffc1012059b3597ef0f1b4d8
Author: Philippe Rouquier <bonfire-app wanadoo fr>
Date:   Mon Sep 28 13:45:55 2009 +0200

    Reprobe the drive contents after every blank operation

 libbrasero-burn/brasero-burn.c |   27 ++++++++++++++-------------
 1 files changed, 14 insertions(+), 13 deletions(-)
---
diff --git a/libbrasero-burn/brasero-burn.c b/libbrasero-burn/brasero-burn.c
index 66ed245..6be6a8f 100644
--- a/libbrasero-burn/brasero-burn.c
+++ b/libbrasero-burn/brasero-burn.c
@@ -1370,6 +1370,7 @@ brasero_burn_run_eraser (BraseroBurn *burn, GError **error)
 	BraseroDrive *drive;
 	BraseroMedium *medium;
 	BraseroBurnPrivate *priv;
+	BraseroBurnResult result;
 
 	priv = BRASERO_BURN_PRIVATE (burn);
 
@@ -1386,7 +1387,19 @@ brasero_burn_run_eraser (BraseroBurn *burn, GError **error)
 		return BRASERO_BURN_ERR;
 	}
 
-	return brasero_task_run (priv->task, error);
+	result = brasero_task_run (priv->task, error);
+	if (result != BRASERO_BURN_OK)
+		return result;
+
+	/* Reprobe. It can happen (like with dvd+rw-format) that
+	 * for the whole OS, the disc doesn't exist during the 
+	 * formatting. Wait for the disc to reappear */
+	/*  Likewise, this is necessary when we do a
+	 * simulation before blanking since it blanked the disc
+	 * and then to create all tasks necessary for the real
+	 * burning operation, we'll need the real medium status 
+	 * not to include a blanking job again. */
+	return brasero_burn_reprobe (burn);
 }
 
 static BraseroBurnResult
@@ -1979,18 +1992,6 @@ brasero_burn_run_tasks (BraseroBurn *burn,
 				if (result != BRASERO_BURN_OK)
 					break;
 
-				/* Reprobe. It can happen (like with dvd+rw-format) that
-				 * for the whole OS, the disc doesn't exist during the 
-				 * formatting. Wait for the disc to reappear */
-				/*  Likewise, this is necessary when we do a
-				 * simulation before blanking since it blanked the disc
-				 * and then to create all tasks necessary for the real
-				 * burning operation, we'll need the real medium status 
-				 * not to include a blanking job again. */
-				result = brasero_burn_reprobe (burn);
-				if (result != BRASERO_BURN_OK)
-					break;
-
 				/* Since we blanked/formatted we need to recheck the burn 
 				 * flags with the new medium type as some flags could have
 				 * been given the benefit of the double (MULTI with a CLOSED



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