[brasero/gnome-2-28] Fix a data corruption when libisofs was used with for a dummy session
- From: Philippe Rouquier <philippr src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [brasero/gnome-2-28] Fix a data corruption when libisofs was used with for a dummy session
- Date: Sat, 26 Sep 2009 19:11:26 +0000 (UTC)
commit a5a1d6cf8fd9ba31a599f2e1ab68768a3bab0f75
Author: Philippe Rouquier <bonfire-app wanadoo fr>
Date: Sat Sep 26 20:32:10 2009 +0200
Fix a data corruption when libisofs was used with for a dummy session
After a successful dummy session libisofs would not re-generate the image and though burning may not fail it was not the data meant to be burnt
plugins/libburnia/burn-libisofs.c | 36 ++++++++++++++++++++----------------
1 files changed, 20 insertions(+), 16 deletions(-)
---
diff --git a/plugins/libburnia/burn-libisofs.c b/plugins/libburnia/burn-libisofs.c
index 0e9fb49..b6715c3 100644
--- a/plugins/libburnia/burn-libisofs.c
+++ b/plugins/libburnia/burn-libisofs.c
@@ -876,6 +876,19 @@ brasero_libisofs_create_volume (BraseroLibisofs *self, GError **error)
return BRASERO_BURN_OK;
}
+static void
+brasero_libisofs_clean_output (BraseroLibisofs *self)
+{
+ BraseroLibisofsPrivate *priv;
+
+ priv = BRASERO_LIBISOFS_PRIVATE (self);
+
+ if (priv->libburn_src) {
+ burn_source_free (priv->libburn_src);
+ priv->libburn_src = NULL;
+ }
+}
+
static BraseroBurnResult
brasero_libisofs_start (BraseroJob *job,
GError **error)
@@ -889,6 +902,10 @@ brasero_libisofs_start (BraseroJob *job,
brasero_job_get_action (job, &action);
if (action == BRASERO_JOB_ACTION_SIZE) {
+ /* do this to avoid a problem when using
+ * DUMMY flag. libisofs would not generate
+ * a second time. */
+ brasero_libisofs_clean_output (BRASERO_LIBISOFS (job));
brasero_job_set_current_action (BRASERO_JOB (self),
BRASERO_BURN_ACTION_GETTING_SIZE,
NULL,
@@ -978,22 +995,6 @@ brasero_libisofs_init (BraseroLibisofs *obj)
}
static void
-brasero_libisofs_clean_output (BraseroLibisofs *self)
-{
- BraseroLibisofsPrivate *priv;
-
- priv = BRASERO_LIBISOFS_PRIVATE (self);
-
- if (priv->libburn_src) {
- burn_source_free (priv->libburn_src);
- priv->libburn_src = NULL;
- }
-
- /* close libisofs library */
- iso_finish ();
-}
-
-static void
brasero_libisofs_finalize (GObject *object)
{
BraseroLibisofs *cobj;
@@ -1015,6 +1016,9 @@ brasero_libisofs_finalize (GObject *object)
priv->cond = NULL;
}
+ /* close libisofs library */
+ iso_finish ();
+
G_OBJECT_CLASS (parent_class)->finalize (object);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]