brasero r760 - in trunk: . src src/plugins/checksum src/plugins/local-track



Author: philippr
Date: Wed Apr 23 07:52:57 2008
New Revision: 760
URL: http://svn.gnome.org/viewvc/brasero?rev=760&view=rev

Log:
	Fixes #512694 â can\'t set tmp dir and can\'t burn image if size > available on /tmp

	* src/burn-job.c (brasero_job_set_output_file):
	* src/plugins/checksum/burn-checksum-files.c
	(brasero_checksum_files_start):
	* src/plugins/checksum/burn-checksum-image.c
	(brasero_checksum_image_checksum_fd_input),
	(brasero_checksum_image_image_and_checksum),
	(brasero_checksum_image_start):
	* src/plugins/local-track/burn-local-image.c
	(brasero_local_track_start):

Modified:
   trunk/ChangeLog
   trunk/src/burn-job.c
   trunk/src/plugins/checksum/burn-checksum-files.c
   trunk/src/plugins/checksum/burn-checksum-image.c
   trunk/src/plugins/local-track/burn-local-image.c

Modified: trunk/src/burn-job.c
==============================================================================
--- trunk/src/burn-job.c	(original)
+++ trunk/src/burn-job.c	Wed Apr 23 07:52:57 2008
@@ -534,6 +534,7 @@
 	priv->output->toc = toc;
 
 	flags = brasero_burn_session_get_flags (session);
+
 	if (flags & BRASERO_BURN_FLAG_CHECK_SIZE)
 		return brasero_job_check_output_volume_space (self, error);
 

Modified: trunk/src/plugins/checksum/burn-checksum-files.c
==============================================================================
--- trunk/src/plugins/checksum/burn-checksum-files.c	(original)
+++ trunk/src/plugins/checksum/burn-checksum-files.c	Wed Apr 23 07:52:57 2008
@@ -1035,8 +1035,11 @@
 	BraseroJobAction action;
 
 	brasero_job_get_action (job, &action);
-	if (action == BRASERO_JOB_ACTION_SIZE)
-		return BRASERO_BURN_NOT_SUPPORTED;
+	if (action == BRASERO_JOB_ACTION_SIZE) {
+		/* say we won't write to disc */
+		brasero_job_set_output_size_for_current_track (job, 0, 0);
+		return BRASERO_BURN_NOT_RUNNING;
+	}
 
 	/* we start a thread for the exploration of the graft points */
 	priv = BRASERO_CHECKSUM_FILES_PRIVATE (job);

Modified: trunk/src/plugins/checksum/burn-checksum-image.c
==============================================================================
--- trunk/src/plugins/checksum/burn-checksum-image.c	(original)
+++ trunk/src/plugins/checksum/burn-checksum-image.c	Wed Apr 23 07:52:57 2008
@@ -233,7 +233,7 @@
 
 	priv = BRASERO_CHECKSUM_IMAGE_PRIVATE (self);
 
-	BRASERO_JOB_LOG (self, "Starting md5 generation live (size = %i)", priv->total);
+	BRASERO_JOB_LOG (self, "Starting checksum generation live (size = %i)", priv->total);
 	result = brasero_job_set_nonblocking (BRASERO_JOB (self), error);
 	if (result != BRASERO_BURN_OK)
 		return result;
@@ -367,7 +367,7 @@
 
 static BraseroBurnResult
 brasero_checksum_image_image_and_checksum (BraseroChecksumImage *self,
-				   GError **error)
+					   GError **error)
 {
 	GConfClient *client;
 	BraseroBurnResult result;
@@ -396,10 +396,22 @@
 					FALSE);
 	brasero_job_start_progress (BRASERO_JOB (self), FALSE);
 
-	if (brasero_job_get_fd_in (BRASERO_JOB (self), NULL) == BRASERO_BURN_OK)
-		result = brasero_checksum_image_checksum_fd_input (self, checksum_type, error);
-	else
+	if (brasero_job_get_fd_in (BRASERO_JOB (self), NULL) != BRASERO_BURN_OK) {
+		BraseroTrack *track;
+
+		brasero_job_get_current_track (BRASERO_JOB (self), &track);
+		result = brasero_track_get_image_size (track,
+						       NULL,
+						       NULL,
+						       &priv->total,
+						       error);
+		if (result != BRASERO_BURN_OK)
+			return result;
+
 		result = brasero_checksum_image_checksum_file_input (self, checksum_type, error);
+	}
+	else
+		result = brasero_checksum_image_checksum_fd_input (self, checksum_type, error);
 
 	return result;
 }
@@ -552,8 +564,11 @@
 	BraseroJobAction action;
 
 	brasero_job_get_action (job, &action);
-	if (action == BRASERO_JOB_ACTION_SIZE)
-		return BRASERO_BURN_NOT_SUPPORTED;
+	if (action == BRASERO_JOB_ACTION_SIZE) {
+		/* say we won't write to disc */
+		brasero_job_set_output_size_for_current_track (job, 0, 0);
+		return BRASERO_BURN_NOT_RUNNING;
+	}
 
 	/* we start a thread for the exploration of the graft points */
 	priv = BRASERO_CHECKSUM_IMAGE_PRIVATE (job);
@@ -561,7 +576,6 @@
 					BRASERO_CHECKSUM_IMAGE (job),
 					TRUE,
 					error);
-
 	if (!priv->thread)
 		return BRASERO_BURN_ERR;
 

Modified: trunk/src/plugins/local-track/burn-local-image.c
==============================================================================
--- trunk/src/plugins/local-track/burn-local-image.c	(original)
+++ trunk/src/plugins/local-track/burn-local-image.c	Wed Apr 23 07:52:57 2008
@@ -789,11 +789,13 @@
 	self = BRASERO_LOCAL_TRACK (job);
 	priv = BRASERO_LOCAL_TRACK_PRIVATE (self);
 
-	brasero_job_get_action (job, &action);
-
 	/* skip that part */
-	if (action == BRASERO_JOB_ACTION_SIZE)
+	brasero_job_get_action (job, &action);
+	if (action == BRASERO_JOB_ACTION_SIZE) {
+		/* say we won't write to disc */
+		brasero_job_set_output_size_for_current_track (job, 0, 0);
 		return BRASERO_BURN_NOT_RUNNING;
+	}
 
 	if (action != BRASERO_JOB_ACTION_IMAGE)
 		return BRASERO_BURN_NOT_SUPPORTED;



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