[rhythmbox] rhythmdb: don't use rhythmdb_add_timeout_commit for metadata changes (bug #603929)



commit 253c7aae20ba3a63da98a52b3785c6f79dcf416f
Author: Jonathan Matthew <jonathan d14n org>
Date:   Mon Dec 7 20:14:49 2009 +1000

    rhythmdb: don't use rhythmdb_add_timeout_commit for metadata changes (bug #603929)
    
    The problem with this is that we don't want these changes to be synced
    with the file, but if we call rhythmdb_commit for some other reason,
    such as hiding a file that is no longer present in the library
    directory, before the timeout expires, the changes will be committed
    with the sync_changes flag set to TRUE, so we'll end up writing the data
    back to the file.
    
    Other calls to rhythmdb_add_timeout_commit are safe, as they're made for
    entries that can't be synced (such as import errors or ignored files) or
    for changes that need to be synced.

 rhythmdb/rhythmdb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/rhythmdb/rhythmdb.c b/rhythmdb/rhythmdb.c
index 5b1c652..93c5742 100644
--- a/rhythmdb/rhythmdb.c
+++ b/rhythmdb/rhythmdb.c
@@ -2415,7 +2415,7 @@ rhythmdb_process_metadata_load_real (RhythmDBEvent *event)
 	if (eel_gconf_get_boolean (CONF_MONITOR_LIBRARY) && event->entry_type == RHYTHMDB_ENTRY_TYPE_SONG)
 		rhythmdb_monitor_uri_path (event->db, rb_refstring_get (entry->location), NULL);
 
-	rhythmdb_add_timeout_commit (event->db, FALSE);
+	rhythmdb_commit (event->db);
 
 	return TRUE;
 }



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