diff options
author | Hans Petter Jansson <hpj@novell.com> | 2008-07-18 03:21:34 +0000 |
---|---|---|
committer | Hans Petter <hansp@src.gnome.org> | 2008-07-18 03:21:34 +0000 |
commit | 195dd86683f525515069e6630a5f258f1bc39487 (patch) | |
tree | cdc151e2539d65f7a685cb1c6f954f61c6cd51f8 | |
parent | d00f83965fd05db283b24f30bc38e07465caa40b (diff) | |
download | gvfs-195dd86683f525515069e6630a5f258f1bc39487.tar.gz |
Steal the old file handle record from the global hash table before
2008-07-17 Hans Petter Jansson <hpj@novell.com>
* client/gvfsfusedaemon.c (reindex_file_handle_for_path): Steal the
old file handle record from the global hash table before replacing
its path, not after. Part of fix for #536614.
svn path=/trunk/; revision=1819
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | client/gvfsfusedaemon.c | 4 |
2 files changed, 9 insertions, 1 deletions
@@ -1,3 +1,9 @@ +2008-07-17 Hans Petter Jansson <hpj@novell.com> + + * client/gvfsfusedaemon.c (reindex_file_handle_for_path): Steal the + old file handle record from the global hash table before replacing + its path, not after. Part of fix for #536614. + 2008-07-16 David Zeuthen <davidz@redhat.com> * monitor/proxy/gproxyvolumemonitor.c: diff --git a/client/gvfsfusedaemon.c b/client/gvfsfusedaemon.c index b59ab4ab..bc70b53c 100644 --- a/client/gvfsfusedaemon.c +++ b/client/gvfsfusedaemon.c @@ -311,9 +311,11 @@ reindex_file_handle_for_path (const gchar *old_path, const gchar *new_path) (gpointer *) &fh)) goto out; + g_hash_table_steal (global_fh_table, old_path); + g_free (fh->path); fh->path = g_strdup (new_path); - g_hash_table_steal (global_fh_table, old_path); + g_hash_table_insert (global_fh_table, fh->path, fh); out: |