Commit bf5c944c authored by Yves-Alexis Perez's avatar Yves-Alexis Perez

0001-Don-t-check-source-file-for-user-created-directories cherry-picked

from git master, fix crash at burn time when adding a new directory to a
composition.                                              closes: #613563
parent b1366a51
......@@ -3,6 +3,9 @@ xfburn (0.4.3-5) UNRELEASED; urgency=low
* debian/patches:
- es-translation-update added, improve Spanish translation, thanks Fco.
Javier Fernández Serrador. closes: #696599
- 0001-Don-t-check-source-file-for-user-created-directories cherry-picked
from git master, fix crash at burn time when adding a new directory to a
composition. closes: #613563
* debian/control:
- update debhelper build-dep to 9 since we use compat mode 9.
......
From 611d915887b09148e74c28704dc5a0bef16d90fd Mon Sep 17 00:00:00 2001
From: David Mohr <david@mcbf.net>
Date: Sat, 16 Jun 2012 17:22:55 +0200
Subject: [PATCH] Don't check source file for user created directories.
---
xfburn/xfburn-data-composition.c | 37 ++++++++++++++++++++-----------------
1 file changed, 20 insertions(+), 17 deletions(-)
diff --git a/xfburn/xfburn-data-composition.c b/xfburn/xfburn-data-composition.c
index 052788e..fc54cd4 100644
--- a/xfburn/xfburn-data-composition.c
+++ b/xfburn/xfburn-data-composition.c
@@ -1867,26 +1867,29 @@ fill_image_with_composition (GtkTreeModel *model, IsoImage *image, IsoDir * pare
g_error ("Failed adding %s as a node to the image: code %X!", src, r);
}
- basename = g_path_get_basename (src);
-
- /* check if the file has been renamed */
- if (strcmp (basename, name) != 0) {
- /* rename the iso_node */
- r = iso_node_set_name (node, name);
-
- if (r == 0) {
- /* The first string is the renamed name, the second one the original name */
- xfce_dialog_show_warning(NULL, NULL, _("Duplicate filename '%s' for '%s'"), name, src);
-
- g_free (basename);
- g_free (name);
- g_free (src);
-
- continue;
+ if (src != '\0') {
+ basename = g_path_get_basename (src);
+
+ /* check if the file has been renamed */
+ if (strcmp (basename, name) != 0) {
+ /* rename the iso_node */
+ r = iso_node_set_name (node, name);
+
+ if (r == 0) {
+ /* The first string is the renamed name, the second one the original name */
+ xfce_dialog_show_warning(NULL, NULL, _("Duplicate filename '%s' for '%s'"), name, src);
+
+ g_free (basename);
+ g_free (name);
+ g_free (src);
+
+ continue;
+ }
}
+
+ g_free (basename);
}
- g_free (basename);
g_free (name);
g_free (src);
--
1.7.10.4
xfburn-gio.patch
xfburn-ui.patch
es-translation-update.patch
0001-Don-t-check-source-file-for-user-created-directories.patch
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment