[brasero] Fix #538060 - Brasero fails to read cue file when PATH contains a non fully qualified path
- From: Philippe Rouquier <philippr src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [brasero] Fix #538060 - Brasero fails to read cue file when PATH contains a non fully qualified path
- Date: Sun, 22 Nov 2009 21:18:12 +0000 (UTC)
commit 6c8f40669319c465e4f042bc6d6c743de4a8c7b1
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 26ab8ee..b2aa62c 100644
--- a/plugins/cdrkit/burn-wodim.c
+++ b/plugins/cdrkit/burn-wodim.c
@@ -966,6 +966,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) {
@@ -973,6 +974,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);
+
/* we need to check endianness */
if (brasero_track_image_need_byte_swap (BRASERO_TRACK_IMAGE (track)))
g_ptr_array_add (argv, g_strdup ("-swab"));
diff --git a/plugins/cdrtools/burn-cdrecord.c b/plugins/cdrtools/burn-cdrecord.c
index 8687622..fd5f6e8 100644
--- a/plugins/cdrtools/burn-cdrecord.c
+++ b/plugins/cdrtools/burn-cdrecord.c
@@ -962,6 +962,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) {
@@ -969,6 +970,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);
+
/* we need to check endianness */
if (brasero_track_image_need_byte_swap (BRASERO_TRACK_IMAGE (track)))
g_ptr_array_add (argv, g_strdup ("-swab"));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]