[nautilus-sendto] Bug 579486 – nautilus-sendto 1.1.4 crashes Pidgin on startup
- From: Bastien Nocera <hadess src gnome org>
- To: svn-commits-list gnome org
- Subject: [nautilus-sendto] Bug 579486 – nautilus-sendto 1.1.4 crashes Pidgin on startup
- Date: Mon, 20 Apr 2009 06:20:41 -0400 (EDT)
commit 904b5462bb6d220c55a74b9608a540c68fc5a2c9
Author: Bastien Nocera <hadess hadess net>
Date: Mon Apr 20 11:19:24 2009 +0100
Bug 579486 â?? nautilus-sendto 1.1.4 crashes Pidgin on startup
Fix infinite loop on startup when ignoring the "tmp" directory
in take_spool_files().
Use g_build_filename instead of g_build_path.
---
pidgin_plugin/nautilus-sendto-plugin.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/pidgin_plugin/nautilus-sendto-plugin.c b/pidgin_plugin/nautilus-sendto-plugin.c
index dab146d..cb09220 100644
--- a/pidgin_plugin/nautilus-sendto-plugin.c
+++ b/pidgin_plugin/nautilus-sendto-plugin.c
@@ -141,7 +141,7 @@ init_plugin_stuff (void)
char *spool_tmp;
gboolean retval;
- spool_tmp = g_build_path ("/", g_get_home_dir(), PLUGIN_HOME, "spool", "tmp", NULL);
+ spool_tmp = g_build_filename (g_get_home_dir(), PLUGIN_HOME, "spool", "tmp", NULL);
if (g_mkdir_with_parents (spool_tmp, 0755) < 0) {
int error = errno;
g_warning ("Failed to create '%s': %s", spool_tmp, g_strerror (error));
@@ -222,7 +222,7 @@ take_spool_files (gpointer user_data)
GError *err = NULL;
taking_files = TRUE;
- plugin_spool = g_build_path ("/", g_get_home_dir(), PLUGIN_HOME, "spool", NULL);
+ plugin_spool = g_build_filename (g_get_home_dir(), PLUGIN_HOME, "spool", NULL);
dir = g_dir_open (plugin_spool, 0, &err);
g_free (plugin_spool);
if (dir == NULL) {
@@ -235,8 +235,10 @@ take_spool_files (gpointer user_data)
while (filename) {
char *file;
- if (g_str_equal (filename, "tmp"))
+ if (g_str_equal (filename, "tmp")) {
+ filename = g_dir_read_name (dir);
continue;
+ }
file = g_build_filename (g_get_home_dir(),
PLUGIN_HOME, "spool",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]