brasero r1228 - in trunk: . src



Author: philippr
Date: Sun Aug 31 19:35:52 2008
New Revision: 1228
URL: http://svn.gnome.org/viewvc/brasero?rev=1228&view=rev

Log:
	Fix problems with CLONE image when choosing the toc file.
	Now brasero can properly retrieve the image file from the toc file and
	vice versa.

	* src/burn-image-format.c (brasero_image_format_get_complement):
	* src/burn-session.c (brasero_burn_session_get_image_complement):


Modified:
   trunk/ChangeLog
   trunk/src/burn-image-format.c
   trunk/src/burn-session.c
   trunk/src/burn-task.c
   trunk/src/burn-track.c

Modified: trunk/src/burn-image-format.c
==============================================================================
--- trunk/src/burn-image-format.c	(original)
+++ trunk/src/burn-image-format.c	Sun Aug 31 19:35:52 2008
@@ -196,13 +196,10 @@
 	gchar *retval = NULL;
 
 	if (format == BRASERO_IMAGE_FORMAT_CLONE) {
-		/* These are set rules no need to parse */
+		/* These are set rules no need to parse:
+		 * the toc file has to end with .toc suffix */
 		if (g_str_has_suffix (path, ".toc"))
-			retval = g_strdup_printf ("%.*sraw",
-						  strlen (path) - 3,
-						  path);
-		else
-			retval = g_strdup_printf ("%s.raw", path);
+			retval = g_strndup (path, strlen (path) - 4);
 	}
 	else if (format == BRASERO_IMAGE_FORMAT_CUE) {
 		/* need to parse */

Modified: trunk/src/burn-session.c
==============================================================================
--- trunk/src/burn-session.c	(original)
+++ trunk/src/burn-session.c	Sun Aug 31 19:35:52 2008
@@ -515,14 +515,8 @@
 
 	priv = BRASERO_BURN_SESSION_PRIVATE (self);
 
-	if (format == BRASERO_IMAGE_FORMAT_CLONE) {
-		if (g_str_has_suffix (path, ".raw"))
-			retval = g_strdup_printf ("%.*stoc",
-						  strlen (path) - 3,
-						  path);
-		else
+	if (format == BRASERO_IMAGE_FORMAT_CLONE)
 			retval = g_strdup_printf ("%s.toc", path);
-	}
 	else if (format == BRASERO_IMAGE_FORMAT_CUE) {
 		if (g_str_has_suffix (path, ".bin"))
 			retval = g_strdup_printf ("%.*scue",

Modified: trunk/src/burn-task.c
==============================================================================
--- trunk/src/burn-task.c	(original)
+++ trunk/src/burn-task.c	Sun Aug 31 19:35:52 2008
@@ -408,7 +408,6 @@
 			return result;
 
 		BRASERO_BURN_LOG ("Got a default image track length %lli", sectors);
-
 		brasero_task_ctx_set_output_size_for_current_track (BRASERO_TASK_CTX (self),
 								    sectors,
 								    size);

Modified: trunk/src/burn-track.c
==============================================================================
--- trunk/src/burn-track.c	(original)
+++ trunk/src/burn-track.c	Sun Aug 31 19:35:52 2008
@@ -1041,10 +1041,10 @@
 	else if (track->type.subtype.img_format == BRASERO_IMAGE_FORMAT_CLONE) {
 		gchar *path;
 
-		if (!image->image)
+		path = brasero_track_get_image_source (track, FALSE);
+		if (!path)
 			return BRASERO_BURN_ERR;
 
-		path = brasero_track_get_localpath (image->image);
 		if (!brasero_image_format_get_clone_size (path, blocks, size, error)) {
 			g_free (path);
 			return BRASERO_BURN_ERR;



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