[brasero] Make sure to set the label for the volume _after_ the former session has been imported or it get rep
- From: Philippe Rouquier <philippr src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [brasero] Make sure to set the label for the volume _after_ the former session has been imported or it get rep
- Date: Sun, 4 Oct 2009 12:22:18 +0000 (UTC)
commit 0a4d81b40ac710d616b3ccd7ad0a1692ad24f9da
Author: Philippe Rouquier <bonfire-app wanadoo fr>
Date: Sat Oct 3 14:25:04 2009 +0200
Make sure to set the label for the volume _after_ the former session has been imported or it get replaced
plugins/libburnia/burn-libisofs.c | 34 +++++++++++++++++++---------------
1 files changed, 19 insertions(+), 15 deletions(-)
---
diff --git a/plugins/libburnia/burn-libisofs.c b/plugins/libburnia/burn-libisofs.c
index db915e5..a26fad3 100644
--- a/plugins/libburnia/burn-libisofs.c
+++ b/plugins/libburnia/burn-libisofs.c
@@ -494,6 +494,7 @@ brasero_libisofs_import_last_session (BraseroLibisofs *self,
}
if (result < 0) {
+ BRASERO_JOB_LOG (self, "Import failed 0x%x", result);
g_set_error (error,
BRASERO_BURN_ERROR,
BRASERO_BURN_ERROR_IMAGE_LAST_SESSION,
@@ -555,20 +556,6 @@ brasero_libisofs_create_volume_thread (gpointer data)
goto end;
}
- publisher = g_strdup_printf ("Brasero-%i.%i.%i",
- BRASERO_MAJOR_VERSION,
- BRASERO_MINOR_VERSION,
- BRASERO_SUB);
-
- if (label)
- iso_image_set_volume_id (image, label);
-
- iso_image_set_publisher_id (image, publisher);
- iso_image_set_data_preparer_id (image, g_get_real_name ());
-
- g_free (publisher);
- g_free (label);
-
iso_write_opts_new (&opts, 2);
brasero_job_get_flags (BRASERO_JOB (self), &flags);
@@ -579,8 +566,10 @@ brasero_libisofs_create_volume_thread (gpointer data)
image,
opts,
&priv->error);
- if (result != BRASERO_BURN_OK)
+ if (result != BRASERO_BURN_OK) {
+ g_free (label);
goto end;
+ }
}
else if (flags & BRASERO_BURN_FLAG_APPEND) {
goffset start_block;
@@ -589,6 +578,21 @@ brasero_libisofs_create_volume_thread (gpointer data)
iso_write_opts_set_ms_block (opts, start_block);
}
+ /* set label but set it after merging so the
+ * new does not get replaced by the former */
+ publisher = g_strdup_printf ("Brasero-%i.%i.%i",
+ BRASERO_MAJOR_VERSION,
+ BRASERO_MINOR_VERSION,
+ BRASERO_SUB);
+
+ if (label)
+ iso_image_set_volume_id (image, label);
+
+ iso_image_set_publisher_id (image, publisher);
+ iso_image_set_data_preparer_id (image, g_get_real_name ());
+
+ g_free (publisher);
+ g_free (label);
brasero_job_start_progress (BRASERO_JOB (self), FALSE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]