[nautilus] Don't crash when duplicate entires are in .hidden
- From: William Jon McCann <mccann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] Don't crash when duplicate entires are in .hidden
- Date: Fri, 17 Aug 2012 17:03:40 +0000 (UTC)
commit 9d98ebadc1401ed87e5054944850f5c7a19d2833
Author: William Jon McCann <jmccann redhat com>
Date: Fri Aug 17 12:26:15 2012 -0400
Don't crash when duplicate entires are in .hidden
Don't insert free'd string pointers into the hash values.
https://bugzilla.gnome.org/show_bug.cgi?id=668674
libnautilus-private/nautilus-directory-async.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/libnautilus-private/nautilus-directory-async.c b/libnautilus-private/nautilus-directory-async.c
index 7fb7272..9bf18b3 100644
--- a/libnautilus-private/nautilus-directory-async.c
+++ b/libnautilus-private/nautilus-directory-async.c
@@ -2050,7 +2050,7 @@ read_dot_hidden_file (NautilusDirectory *directory)
char *hidden_filename;
hidden_filename = g_strndup (file_contents + start, i - start);
- g_hash_table_insert (directory->details->hidden_file_hash,
+ g_hash_table_replace (directory->details->hidden_file_hash,
hidden_filename, hidden_filename);
}
@@ -2219,7 +2219,7 @@ start_monitoring_file_list (NautilusDirectory *directory)
}
fn = g_strdup (kde_trash_dir_name);
- g_hash_table_insert (directory->details->hidden_file_hash,
+ g_hash_table_replace (directory->details->hidden_file_hash,
fn, fn);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]