brasero r882 - in trunk: . src
- From: philippr svn gnome org
- To: svn-commits-list gnome org
- Subject: brasero r882 - in trunk: . src
- Date: Wed, 11 Jun 2008 15:45:15 +0000 (UTC)
Author: philippr
Date: Wed Jun 11 15:45:15 2008
New Revision: 882
URL: http://svn.gnome.org/viewvc/brasero?rev=882&view=rev
Log:
Fix #532495 â crash when removing/moving a file that has been added to brasero
* src/brasero-data-project.c (brasero_data_project_file_removed):
* src/brasero-file-monitor.c (brasero_file_monitor_moved_to_event),
(brasero_file_monitor_move_timeout_cb),
(brasero_file_monitor_moved_from_event),
(brasero_file_monitor_directory_event):
Modified:
trunk/ChangeLog
trunk/src/brasero-data-project.c
trunk/src/brasero-file-monitor.c
Modified: trunk/src/brasero-data-project.c
==============================================================================
--- trunk/src/brasero-data-project.c (original)
+++ trunk/src/brasero-data-project.c Wed Jun 11 15:45:15 2008
@@ -3310,7 +3310,7 @@
g_free (uri);
/* check if we can remove it (no more nodes) */
- if (uri_node->nodes)
+ if (!uri_node || uri_node->nodes)
return;
g_hash_table_remove (priv->grafts, uri_node->uri);
Modified: trunk/src/brasero-file-monitor.c
==============================================================================
--- trunk/src/brasero-file-monitor.c (original)
+++ trunk/src/brasero-file-monitor.c Wed Jun 11 15:45:15 2008
@@ -109,6 +109,8 @@
priv = BRASERO_FILE_MONITOR_PRIVATE (self);
klass = BRASERO_FILE_MONITOR_GET_CLASS (self);
+ BRASERO_BURN_LOG ("File Monitoring (move to for %s)", name);
+
if (!cookie) {
if (klass->file_added)
klass->file_added (self, callback_data, name);
@@ -181,6 +183,8 @@
data = priv->moved_list->data;
priv->moved_list = g_slist_remove (priv->moved_list, data);
+ BRASERO_BURN_LOG ("File Monitoring (move timeout for %s)", data->name);
+
if (klass->file_removed)
klass->file_removed (self,
data->type,
@@ -205,6 +209,8 @@
priv = BRASERO_FILE_MONITOR_PRIVATE (self);
+ BRASERO_BURN_LOG ("File Monitoring (moved from event for %s)", name);
+
if (!cookie) {
BraseroFileMonitorClass *klass;
@@ -250,20 +256,25 @@
* This is done to avoid treating events twice.
* IN_DELETE_SELF or IN_MOVE_SELF are therefore not possible here. */
if (event->mask & IN_ATTRIB) {
+ BRASERO_BURN_LOG ("File Monitoring (attributes changed for %s)", name);
if (klass->file_modified)
klass->file_modified (self, callback_data, name);
}
else if (event->mask & IN_MODIFY) {
+ BRASERO_BURN_LOG ("File Monitoring (modified for %s)", name);
if (klass->file_modified)
klass->file_modified (self, callback_data, name);
}
else if (event->mask & IN_MOVED_FROM) {
+ BRASERO_BURN_LOG ("File Monitoring (moved from for %s)", name);
brasero_file_monitor_moved_from_event (self, type, callback_data, name, event->cookie);
}
else if (event->mask & IN_MOVED_TO) {
+ BRASERO_BURN_LOG ("File Monitoring (moved to for %s)", name);
brasero_file_monitor_moved_to_event (self, callback_data, name, event->cookie);
}
else if (event->mask & (IN_DELETE|IN_UNMOUNT)) {
+ BRASERO_BURN_LOG ("File Monitoring (delete/unmount for %s)", name);
if (klass->file_removed)
klass->file_removed (self,
type,
@@ -271,6 +282,7 @@
name);
}
else if (event->mask & IN_CREATE) {
+ BRASERO_BURN_LOG ("File Monitoring (create for %s)", name);
if (klass->file_added)
klass->file_added (self, callback_data, name);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]