brasero r1890 - in trunk: . src src/plugins/cdrkit src/plugins/cdrtools src/plugins/growisofs src/plugins/libburnia
- From: philippr svn gnome org
- To: svn-commits-list gnome org
- Subject: brasero r1890 - in trunk: . src src/plugins/cdrkit src/plugins/cdrtools src/plugins/growisofs src/plugins/libburnia
- Date: Sun, 8 Feb 2009 17:07:08 +0000 (UTC)
Author: philippr
Date: Sun Feb 8 17:07:08 2009
New Revision: 1890
URL: http://svn.gnome.org/viewvc/brasero?rev=1890&view=rev
Log:
2009-02-08 Philippe Rouquier <ykw localhost localdomain>
Don't allow JOLIET (so called "Windows compatibility") when there are
symlinks in the tree as joliet doesn't support them.
* src/brasero-data-disc.c (brasero_data_disc_set_session_param),
(brasero_data_disc_load_track):
* src/brasero-data-project.c (brasero_data_project_node_loaded),
(brasero_data_project_add_node_from_info),
(brasero_data_project_get_contents),
(brasero_data_project_has_symlinks),
(brasero_data_project_is_joliet_compliant):
* src/brasero-data-project.h:
* src/brasero-file-node.c (brasero_file_node_set_from_info),
(brasero_file_node_destroy_with_children):
* src/brasero-file-node.h:
* src/burn-caps.c (brasero_caps_data_new):
* src/burn-debug.c (brasero_debug_data_fs_to_string):
* src/burn-track.h:
* src/plugins/cdrkit/burn-genisoimage.c
(brasero_genisoimage_export_caps):
* src/plugins/cdrtools/burn-mkisofs.c
(brasero_mkisofs_export_caps):
* src/plugins/growisofs/burn-growisofs.c
(brasero_growisofs_export_caps):
* src/plugins/libburnia/burn-libisofs.c
(brasero_libisofs_export_caps):
Modified:
trunk/ChangeLog
trunk/src/brasero-data-disc.c
trunk/src/brasero-data-project.c
trunk/src/brasero-data-project.h
trunk/src/brasero-file-node.c
trunk/src/brasero-file-node.h
trunk/src/burn-caps.c
trunk/src/burn-debug.c
trunk/src/burn-track.h
trunk/src/plugins/cdrkit/burn-genisoimage.c
trunk/src/plugins/cdrtools/burn-mkisofs.c
trunk/src/plugins/growisofs/burn-growisofs.c
trunk/src/plugins/libburnia/burn-libisofs.c
Modified: trunk/src/brasero-data-disc.c
==============================================================================
--- trunk/src/brasero-data-disc.c (original)
+++ trunk/src/brasero-data-disc.c Sun Feb 8 17:07:08 2009
@@ -1538,18 +1538,26 @@
stats = BRASERO_FILE_NODE_STATS (root);
fs_type = BRASERO_IMAGE_FS_ISO;
- if (brasero_data_project_is_joliet_compliant (priv->project))
- fs_type |= BRASERO_IMAGE_FS_JOLIET;
+ if (brasero_data_project_has_symlinks (priv->project))
+ fs_type |= BRASERO_IMAGE_FS_SYMLINK;
+ else {
+ /* These two are incompatible with symlinks */
+ if (brasero_data_project_is_joliet_compliant (priv->project))
+ fs_type |= BRASERO_IMAGE_FS_JOLIET;
+
+ if (brasero_data_project_is_video_project (priv->project))
+ fs_type |= BRASERO_IMAGE_FS_VIDEO;
+ }
- if (stats->num_2GiB != 0)
- fs_type |= BRASERO_IMAGE_ISO_FS_LEVEL_3|BRASERO_IMAGE_FS_UDF;
+ if (stats->num_2GiB != 0) {
+ fs_type |= BRASERO_IMAGE_ISO_FS_LEVEL_3;
+ if (!(fs_type & BRASERO_IMAGE_FS_SYMLINK))
+ fs_type |= BRASERO_IMAGE_FS_UDF;
+ }
if (stats->num_deep != 0)
fs_type |= BRASERO_IMAGE_ISO_FS_DEEP_DIRECTORY;
- if (brasero_data_project_is_video_project (priv->project))
- fs_type |= BRASERO_IMAGE_FS_VIDEO;
-
value = g_new0 (GValue, 1);
g_value_init (value, G_TYPE_INT64);
g_value_set_int64 (value, brasero_data_project_get_size (priv->project));
@@ -1663,7 +1671,7 @@
priv = BRASERO_DATA_DISC_PRIVATE (disc);
- /* Firstadd the restored files */
+ /* First add the restored files */
for (iter = track->contents.data.restored; iter; iter = iter->next) {
gchar *uri;
Modified: trunk/src/brasero-data-project.c
==============================================================================
--- trunk/src/brasero-data-project.c (original)
+++ trunk/src/brasero-data-project.c Sun Feb 8 17:07:08 2009
@@ -1887,6 +1887,10 @@
BraseroURINode *graft;
gchar *uri;
+ /* Update our stats and node state as it won't be a symlink anymore */
+ node->is_symlink = FALSE;
+ stats->num_sym --;
+
/* first we exclude the symlink, then we graft its target. */
uri = brasero_data_project_node_to_uri (self, node);
brasero_file_node_ungraft (node);
@@ -2137,8 +2141,18 @@
return NULL;
}
- node = brasero_file_node_new_from_info (info, parent, priv->sort_func);
+ node = brasero_file_node_new_from_info (info,
+ parent,
+ priv->sort_func);
if (node->is_symlink && g_file_info_get_file_type (info) != G_FILE_TYPE_SYMBOLIC_LINK) {
+ BraseroFileTreeStats *stats;
+
+ /* Update our stats and node state as it won't be a symlink anymore */
+ node->is_symlink = FALSE;
+
+ stats = brasero_file_node_get_tree_stats (priv->root, NULL);
+ stats->num_sym --;
+
/* first we exclude the symlink, then we graft its target */
brasero_data_project_exclude_uri (self, uri);
@@ -2455,6 +2469,8 @@
&callback_data);
}
+ /* Finally add all the symlinks */
+
if (grafts)
*grafts = callback_data.grafts;
@@ -2469,12 +2485,32 @@
}
gboolean
+brasero_data_project_has_symlinks (BraseroDataProject *self)
+{
+ BraseroDataProjectPrivate *priv;
+ BraseroFileTreeStats *stats;
+
+ priv = BRASERO_DATA_PROJECT_PRIVATE (self);
+
+ stats = brasero_file_node_get_tree_stats (priv->root, NULL);
+ if (stats->num_sym)
+ return TRUE;
+
+ return FALSE;
+}
+
+gboolean
brasero_data_project_is_joliet_compliant (BraseroDataProject *self)
{
BraseroDataProjectPrivate *priv;
+ BraseroFileTreeStats *stats;
priv = BRASERO_DATA_PROJECT_PRIVATE (self);
+ stats = brasero_file_node_get_tree_stats (priv->root, NULL);
+ if (stats->num_sym)
+ return FALSE;
+
if (!priv->joliet || !g_hash_table_size (priv->joliet))
return TRUE;
Modified: trunk/src/brasero-data-project.h
==============================================================================
--- trunk/src/brasero-data-project.h (original)
+++ trunk/src/brasero-data-project.h Sun Feb 8 17:07:08 2009
@@ -130,6 +130,9 @@
brasero_data_project_is_empty (BraseroDataProject *project);
gboolean
+brasero_data_project_has_symlinks (BraseroDataProject *project);
+
+gboolean
brasero_data_project_is_video_project (BraseroDataProject *project);
gboolean
Modified: trunk/src/brasero-file-node.c
==============================================================================
--- trunk/src/brasero-file-node.c (original)
+++ trunk/src/brasero-file-node.c Sun Feb 8 17:07:08 2009
@@ -746,6 +746,11 @@
stats->children ++;
}
+ if (!node->is_symlink && g_file_info_get_is_symlink (info)) {
+ /* only count files */
+ stats->num_sym ++;
+ }
+
/* update :
* - the mime type
* - the size (and possibly the one of his parent)
@@ -1050,6 +1055,10 @@
if (node->is_deep)
stats->num_deep --;
+ /* check if that's a symlink */
+ if (node->is_symlink)
+ stats->num_sym --;
+
/* update file number statistics */
if (!node->is_imported && node->is_file)
stats->children --;
Modified: trunk/src/brasero-file-node.h
==============================================================================
--- trunk/src/brasero-file-node.h (original)
+++ trunk/src/brasero-file-node.h Sun Feb 8 17:07:08 2009
@@ -69,6 +69,7 @@
guint children;
guint num_deep;
guint num_2GiB;
+ guint num_sym;
};
typedef struct _BraseroFileTreeStats BraseroFileTreeStats;
Modified: trunk/src/burn-caps.c
==============================================================================
--- trunk/src/burn-caps.c (original)
+++ trunk/src/burn-caps.c Sun Feb 8 17:07:08 2009
@@ -3274,7 +3274,7 @@
continue;
if (caps->type.subtype.fs_type == fs_type) {
- /* see if that's the perfect fit */
+ /* that's the perfect fit */
have_the_one = TRUE;
retval = g_slist_prepend (retval, caps);
continue;
Modified: trunk/src/burn-debug.c
==============================================================================
--- trunk/src/burn-debug.c (original)
+++ trunk/src/burn-debug.c Sun Feb 8 17:07:08 2009
@@ -188,6 +188,8 @@
strcat (buffer, "ISO ");
if (fs_type & BRASERO_IMAGE_FS_UDF)
strcat (buffer, "UDF ");
+ if (fs_type & BRASERO_IMAGE_FS_SYMLINK)
+ strcat (buffer, "SYMLINK ");
if (fs_type & BRASERO_IMAGE_ISO_FS_LEVEL_3)
strcat (buffer, "Level 3 ");
if (fs_type & BRASERO_IMAGE_FS_JOLIET)
Modified: trunk/src/burn-track.h
==============================================================================
--- trunk/src/burn-track.h (original)
+++ trunk/src/burn-track.h Sun Feb 8 17:07:08 2009
@@ -50,11 +50,16 @@
BRASERO_IMAGE_FS_UDF = 1 << 1,
BRASERO_IMAGE_FS_JOLIET = 1 << 2,
BRASERO_IMAGE_FS_VIDEO = 1 << 3,
- BRASERO_IMAGE_ISO_FS_LEVEL_3 = 1 << 4,
- BRASERO_IMAGE_ISO_FS_DEEP_DIRECTORY = 1 << 5,
+
+ /* The following one conflict with UDF and JOLIET */
+ BRASERO_IMAGE_FS_SYMLINK = 1 << 4,
+
+ BRASERO_IMAGE_ISO_FS_LEVEL_3 = 1 << 5,
+ BRASERO_IMAGE_ISO_FS_DEEP_DIRECTORY = 1 << 6,
BRASERO_IMAGE_FS_ANY = BRASERO_IMAGE_FS_ISO|
BRASERO_IMAGE_FS_UDF|
BRASERO_IMAGE_FS_JOLIET|
+ BRASERO_IMAGE_FS_SYMLINK|
BRASERO_IMAGE_ISO_FS_LEVEL_3|
BRASERO_IMAGE_FS_VIDEO|
BRASERO_IMAGE_ISO_FS_DEEP_DIRECTORY
Modified: trunk/src/plugins/cdrkit/burn-genisoimage.c
==============================================================================
--- trunk/src/plugins/cdrkit/burn-genisoimage.c (original)
+++ trunk/src/plugins/cdrkit/burn-genisoimage.c Sun Feb 8 17:07:08 2009
@@ -549,21 +549,29 @@
BRASERO_BURN_FLAG_MERGE,
BRASERO_BURN_FLAG_NONE);
+ /* Caps */
+ output = brasero_caps_image_new (BRASERO_PLUGIN_IO_ACCEPT_FILE|
+ BRASERO_PLUGIN_IO_ACCEPT_PIPE,
+ BRASERO_IMAGE_FORMAT_BIN);
+
input = brasero_caps_data_new (BRASERO_IMAGE_FS_ISO|
BRASERO_IMAGE_FS_UDF|
BRASERO_IMAGE_ISO_FS_LEVEL_3|
BRASERO_IMAGE_ISO_FS_DEEP_DIRECTORY|
BRASERO_IMAGE_FS_JOLIET|
BRASERO_IMAGE_FS_VIDEO);
+ brasero_plugin_link_caps (plugin, output, input);
+ g_slist_free (input);
- output = brasero_caps_image_new (BRASERO_PLUGIN_IO_ACCEPT_FILE|
- BRASERO_PLUGIN_IO_ACCEPT_PIPE,
- BRASERO_IMAGE_FORMAT_BIN);
-
+ input = brasero_caps_data_new (BRASERO_IMAGE_FS_ISO|
+ BRASERO_IMAGE_ISO_FS_LEVEL_3|
+ BRASERO_IMAGE_ISO_FS_DEEP_DIRECTORY|
+ BRASERO_IMAGE_FS_SYMLINK);
brasero_plugin_link_caps (plugin, output, input);
- g_slist_free (output);
g_slist_free (input);
+ g_slist_free (output);
+
brasero_plugin_register_group (plugin, _(CDRKIT_DESCRIPTION));
return BRASERO_BURN_OK;
Modified: trunk/src/plugins/cdrtools/burn-mkisofs.c
==============================================================================
--- trunk/src/plugins/cdrtools/burn-mkisofs.c (original)
+++ trunk/src/plugins/cdrtools/burn-mkisofs.c Sun Feb 8 17:07:08 2009
@@ -556,21 +556,29 @@
BRASERO_BURN_FLAG_MERGE,
BRASERO_BURN_FLAG_NONE);
+ /* Caps */
+ output = brasero_caps_image_new (BRASERO_PLUGIN_IO_ACCEPT_FILE|
+ BRASERO_PLUGIN_IO_ACCEPT_PIPE,
+ BRASERO_IMAGE_FORMAT_BIN);
+
input = brasero_caps_data_new (BRASERO_IMAGE_FS_ISO|
BRASERO_IMAGE_FS_UDF|
BRASERO_IMAGE_ISO_FS_LEVEL_3|
BRASERO_IMAGE_ISO_FS_DEEP_DIRECTORY|
BRASERO_IMAGE_FS_JOLIET|
BRASERO_IMAGE_FS_VIDEO);
+ brasero_plugin_link_caps (plugin, output, input);
+ g_slist_free (input);
- output = brasero_caps_image_new (BRASERO_PLUGIN_IO_ACCEPT_FILE|
- BRASERO_PLUGIN_IO_ACCEPT_PIPE,
- BRASERO_IMAGE_FORMAT_BIN);
-
+ input = brasero_caps_data_new (BRASERO_IMAGE_FS_ISO|
+ BRASERO_IMAGE_ISO_FS_LEVEL_3|
+ BRASERO_IMAGE_ISO_FS_DEEP_DIRECTORY|
+ BRASERO_IMAGE_FS_SYMLINK);
brasero_plugin_link_caps (plugin, output, input);
- g_slist_free (output);
g_slist_free (input);
+ g_slist_free (output);
+
brasero_plugin_register_group (plugin, _(CDRTOOLS_DESCRIPTION));
return BRASERO_BURN_OK;
Modified: trunk/src/plugins/growisofs/burn-growisofs.c
==============================================================================
--- trunk/src/plugins/growisofs/burn-growisofs.c (original)
+++ trunk/src/plugins/growisofs/burn-growisofs.c Sun Feb 8 17:07:08 2009
@@ -720,6 +720,8 @@
BraseroPluginConfOption *use_dao;
gboolean use_dao_gconf_key;
BraseroBurnResult result;
+ GSList *input_symlink;
+ GSList *input_joliet;
GConfClient *client;
GSList *output;
GSList *input;
@@ -781,12 +783,17 @@
g_slist_free (input);
/* for DATA type recording discs can be also appendable */
- input = brasero_caps_data_new (BRASERO_IMAGE_FS_ISO|
- BRASERO_IMAGE_FS_UDF|
- BRASERO_IMAGE_ISO_FS_LEVEL_3|
- BRASERO_IMAGE_ISO_FS_DEEP_DIRECTORY|
- BRASERO_IMAGE_FS_JOLIET|
- BRASERO_IMAGE_FS_VIDEO);
+ input_joliet = brasero_caps_data_new (BRASERO_IMAGE_FS_ISO|
+ BRASERO_IMAGE_FS_UDF|
+ BRASERO_IMAGE_ISO_FS_LEVEL_3|
+ BRASERO_IMAGE_ISO_FS_DEEP_DIRECTORY|
+ BRASERO_IMAGE_FS_JOLIET|
+ BRASERO_IMAGE_FS_VIDEO);
+
+ input_symlink = brasero_caps_data_new (BRASERO_IMAGE_FS_ISO|
+ BRASERO_IMAGE_ISO_FS_LEVEL_3|
+ BRASERO_IMAGE_ISO_FS_DEEP_DIRECTORY|
+ BRASERO_IMAGE_FS_SYMLINK);
output = brasero_caps_disc_new (BRASERO_MEDIUM_BD|
BRASERO_MEDIUM_SRM|
@@ -804,7 +811,8 @@
BRASERO_MEDIUM_BLANK|
BRASERO_MEDIUM_APPENDABLE|
BRASERO_MEDIUM_HAS_DATA);
- brasero_plugin_link_caps (plugin, output, input);
+ brasero_plugin_link_caps (plugin, output, input_joliet);
+ brasero_plugin_link_caps (plugin, output, input_symlink);
g_slist_free (output);
/* growisofs has the possibility to record to closed DVD+RW/-restricted
@@ -818,9 +826,12 @@
BRASERO_MEDIUM_REWRITABLE|
BRASERO_MEDIUM_CLOSED|
BRASERO_MEDIUM_HAS_DATA);
- brasero_plugin_link_caps (plugin, output, input);
+
+ brasero_plugin_link_caps (plugin, output, input_joliet);
+ brasero_plugin_link_caps (plugin, output, input_symlink);
g_slist_free (output);
- g_slist_free (input);
+ g_slist_free (input_joliet);
+ g_slist_free (input_symlink);
/* For DVD-RW sequential */
BRASERO_PLUGIN_ADD_STANDARD_DVDRW_FLAGS (plugin, BRASERO_BURN_FLAG_NONE);
Modified: trunk/src/plugins/libburnia/burn-libisofs.c
==============================================================================
--- trunk/src/plugins/libburnia/burn-libisofs.c (original)
+++ trunk/src/plugins/libburnia/burn-libisofs.c Sun Feb 8 17:07:08 2009
@@ -1035,13 +1035,21 @@
output = brasero_caps_image_new (BRASERO_PLUGIN_IO_ACCEPT_FILE|
BRASERO_PLUGIN_IO_ACCEPT_PIPE,
BRASERO_IMAGE_FORMAT_BIN);
+
input = brasero_caps_data_new (BRASERO_IMAGE_FS_ISO|
BRASERO_IMAGE_ISO_FS_DEEP_DIRECTORY|
+ BRASERO_IMAGE_ISO_FS_LEVEL_3|
BRASERO_IMAGE_FS_JOLIET);
-
brasero_plugin_link_caps (plugin, output, input);
+ g_slist_free (input);
+ input = brasero_caps_data_new (BRASERO_IMAGE_FS_ISO|
+ BRASERO_IMAGE_ISO_FS_DEEP_DIRECTORY|
+ BRASERO_IMAGE_ISO_FS_LEVEL_3|
+ BRASERO_IMAGE_FS_SYMLINK);
+ brasero_plugin_link_caps (plugin, output, input);
g_slist_free (input);
+
g_slist_free (output);
brasero_plugin_register_group (plugin, _(LIBBURNIA_DESCRIPTION));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]