[Xfce4-commits] <xfce4-notifyd:master> Fix PATH_MAX beeing undefined on HURD (bug #7528).
Jérôme Guelfucci
noreply at xfce.org
Fri Apr 22 16:52:01 CEST 2011
Updating branch refs/heads/master
to aec7c0439e2c2c3b536f665c1d320a8b898f67ac (commit)
from f98dbb782ed1a3299763fcb5101afb441184f336 (commit)
commit aec7c0439e2c2c3b536f665c1d320a8b898f67ac
Author: Yves-Alexis Perez <corsac at debian.org>
Date: Fri Apr 22 15:59:41 2011 +0200
Fix PATH_MAX beeing undefined on HURD (bug #7528).
xfce4-notifyd-config/main.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/xfce4-notifyd-config/main.c b/xfce4-notifyd-config/main.c
index 1f3d64e..55ddd1d 100644
--- a/xfce4-notifyd-config/main.c
+++ b/xfce4-notifyd-config/main.c
@@ -132,7 +132,7 @@ list_store_add_themes_in_dir(GtkListStore *ls,
{
GDir *dir;
const gchar *file;
- gchar buf[PATH_MAX];
+ gchar *filename;
dir = g_dir_open(path, 0, NULL);
if(!dir)
@@ -142,9 +142,10 @@ list_store_add_themes_in_dir(GtkListStore *ls,
if(g_hash_table_lookup(themes_seen, file))
continue;
- g_snprintf(buf, sizeof(buf), "%s/%s/xfce-notify-4.0/gtkrc",
- path, file);
- if(g_file_test(buf, G_FILE_TEST_IS_REGULAR)) {
+ filename =
+ g_build_filename(path, file, "xfce-notify-4.0", "gtkrc", NULL);
+
+ if(g_file_test(filename, G_FILE_TEST_IS_REGULAR)) {
GtkTreeIter iter;
gtk_list_store_append(ls, &iter);
@@ -155,6 +156,8 @@ list_store_add_themes_in_dir(GtkListStore *ls,
if(!strcmp(file, current_theme))
memcpy(current_theme_iter, &iter, sizeof(iter));
}
+
+ g_free(filename);
}
g_dir_close(dir);
More information about the Xfce4-commits
mailing list