[brasero/gnome-2-28] Fix #538060 - Brasero fails to read cue file when PATH contains a non fully qualified path



commit f55673ee47151e3cde3a4061096aa21f3290d5a4
Author: Philippe Rouquier <bonfire-app wanadoo fr>
Date:   Sun Nov 22 20:43:12 2009 +0100

    Fix #538060 -  Brasero fails to read cue file when PATH contains a non fully qualified path
    When burning a cue sheet with a relative path for the bin, start cdrecord and wodim in the directory containing the cue sheet to work around their inability to resolve properly relative paths

 plugins/cdrkit/burn-wodim.c      |    5 +++++
 plugins/cdrtools/burn-cdrecord.c |    5 +++++
 2 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/plugins/cdrkit/burn-wodim.c b/plugins/cdrkit/burn-wodim.c
index ea9c37c..3d15d73 100644
--- a/plugins/cdrkit/burn-wodim.c
+++ b/plugins/cdrkit/burn-wodim.c
@@ -961,6 +961,7 @@ brasero_wodim_set_argv_record (BraseroWodim *wodim,
 		else if (format == BRASERO_IMAGE_FORMAT_CUE) {
 			gchar *cue_str;
 			gchar *cuepath;
+			gchar *parent;
 
 			cuepath = brasero_track_image_get_toc_source (BRASERO_TRACK_IMAGE (track), FALSE);
 			if (!cuepath) {
@@ -968,6 +969,10 @@ brasero_wodim_set_argv_record (BraseroWodim *wodim,
 				BRASERO_JOB_NOT_READY (wodim);
 			}
 
+			parent = g_path_get_dirname (cuepath);
+			brasero_process_set_working_directory (BRASERO_PROCESS (wodim), parent);
+			g_free (parent);
+
 			g_ptr_array_add (argv, g_strdup ("fs=16m"));
 
 			/* This is to make sure the CD-TEXT stuff gets written */
diff --git a/plugins/cdrtools/burn-cdrecord.c b/plugins/cdrtools/burn-cdrecord.c
index 013efdb..7e7bfcb 100644
--- a/plugins/cdrtools/burn-cdrecord.c
+++ b/plugins/cdrtools/burn-cdrecord.c
@@ -945,6 +945,7 @@ brasero_cdrecord_set_argv_record (BraseroCDRecord *cdrecord,
 		else if (format == BRASERO_IMAGE_FORMAT_CUE) {
 			gchar *cue_str;
 			gchar *cuepath;
+			gchar *parent;
 
 			cuepath = brasero_track_image_get_toc_source (BRASERO_TRACK_IMAGE (track), FALSE);
 			if (!cuepath) {
@@ -952,6 +953,10 @@ brasero_cdrecord_set_argv_record (BraseroCDRecord *cdrecord,
 				BRASERO_JOB_NOT_READY (cdrecord);
 			}
 
+			parent = g_path_get_dirname (cuepath);
+			brasero_process_set_working_directory (BRASERO_PROCESS (cdrecord), parent);
+			g_free (parent);
+
 			g_ptr_array_add (argv, g_strdup ("fs=16m"));
 
 			/* This is to make sure the CD-TEXT stuff gets written */



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