[brasero] Also check whether the drive is probing when checking whether there is something inside
- From: Philippe Rouquier <philippr src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [brasero] Also check whether the drive is probing when checking whether there is something inside
- Date: Wed, 14 Oct 2009 20:32:19 +0000 (UTC)
commit c140d6051a8c82012d16e821bdca71d2baae8bed
Author: Philippe Rouquier <bonfire-app wanadoo fr>
Date: Tue Oct 13 21:04:03 2009 +0200
Also check whether the drive is probing when checking whether there is something inside
libbrasero-burn/brasero-burn.c | 25 ++++++++++++++++++++-----
1 files changed, 20 insertions(+), 5 deletions(-)
---
diff --git a/libbrasero-burn/brasero-burn.c b/libbrasero-burn/brasero-burn.c
index 5a494fb..4188a65 100644
--- a/libbrasero-burn/brasero-burn.c
+++ b/libbrasero-burn/brasero-burn.c
@@ -362,7 +362,7 @@ brasero_burn_eject (BraseroBurn *self,
BRASERO_BURN_LOG ("Ejecting drive/medium");
/* Retry several times, since sometimes the drives are really busy */
- while (brasero_drive_get_medium (drive)) {
+ while (brasero_drive_get_medium (drive) || brasero_drive_probing (drive)) {
GError *ret_error;
counter ++;
@@ -563,13 +563,12 @@ brasero_burn_ask_for_src_media (BraseroBurn *burn,
BraseroMedia required_media,
GError **error)
{
- BraseroMedia media;
BraseroMedium *medium;
BraseroBurnPrivate *priv = BRASERO_BURN_PRIVATE (burn);
medium = brasero_drive_get_medium (priv->src);
- media = brasero_medium_get_status (medium);
- if (media != BRASERO_MEDIUM_NONE) {
+ if (brasero_medium_get_status (medium) != BRASERO_MEDIUM_NONE
+ || brasero_drive_probing (priv->src)) {
BraseroBurnResult result;
result = brasero_burn_eject_src_media (burn, error);
if (result != BRASERO_BURN_OK)
@@ -604,7 +603,8 @@ brasero_burn_ask_for_dest_media (BraseroBurn *burn,
}
medium = brasero_drive_get_medium (priv->dest);
- if (medium || brasero_medium_get_status (medium) != BRASERO_MEDIUM_NONE) {
+ if (brasero_medium_get_status (medium) != BRASERO_MEDIUM_NONE
+ || brasero_drive_probing (priv->dest)) {
BraseroBurnResult result;
result = brasero_burn_eject_dest_media (burn, error);
@@ -642,6 +642,11 @@ brasero_burn_lock_src_media (BraseroBurn *burn,
again:
+ if (brasero_drive_probing (priv->src)) {
+ brasero_burn_sleep (burn, 500);
+ goto again;
+ }
+
medium = brasero_drive_get_medium (priv->src);
if (brasero_volume_is_mounted (BRASERO_VOLUME (medium))) {
if (!brasero_volume_umount (BRASERO_VOLUME (medium), TRUE, NULL))
@@ -729,6 +734,11 @@ brasero_burn_lock_rewritable_media (BraseroBurn *burn,
again:
+ if (brasero_drive_probing (priv->dest)) {
+ brasero_burn_sleep (burn, 500);
+ goto again;
+ }
+
medium = brasero_drive_get_medium (priv->dest);
if (!brasero_medium_can_be_rewritten (medium)) {
g_set_error (error,
@@ -1117,6 +1127,11 @@ brasero_burn_lock_checksum_media (BraseroBurn *burn,
again:
+ if (brasero_drive_probing (priv->dest)) {
+ brasero_burn_sleep (burn, 500);
+ goto again;
+ }
+
medium = brasero_drive_get_medium (priv->dest);
media = brasero_medium_get_status (medium);
error_type = BRASERO_BURN_ERROR_NONE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]