[Xfce4-commits] <xfce4-settings:xfce-4.8> Dynamically allocate the filename (bug #7521).
Nick Schermer
noreply at xfce.org
Fri Apr 22 21:22:01 CEST 2011
Updating branch refs/heads/xfce-4.8
to 13e5f506ba4d30070d32275880cbd8bea678a931 (commit)
from 2bb2ea7eab9590aaf4a024f4080da23d35775f4a (commit)
commit 13e5f506ba4d30070d32275880cbd8bea678a931
Author: Yves-Alexis Perez <corsac at debian.org>
Date: Thu Apr 21 16:47:11 2011 +0200
Dynamically allocate the filename (bug #7521).
PATH_MAX isn't available on hurd and not needed as well.
(cherry picked from commit 57ade33f4b612b03ba14692aef5a5b31d7e7fc1a)
.../xfce-settings-manager-dialog.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/xfce4-settings-manager/xfce-settings-manager-dialog.c b/xfce4-settings-manager/xfce-settings-manager-dialog.c
index 90d34c8..044e94a 100644
--- a/xfce4-settings-manager/xfce-settings-manager-dialog.c
+++ b/xfce4-settings-manager/xfce-settings-manager-dialog.c
@@ -384,7 +384,8 @@ xfce_settings_manager_dialog_sort_icons(GtkTreeModel *model,
static void
xfce_settings_manager_dialog_create_liststore(XfceSettingsManagerDialog *dialog)
{
- gchar **dirs, buf[PATH_MAX];
+ gchar **dirs;
+ gchar *filename;
gint i, icon_size;
GList *dialog_name_list = NULL;
@@ -424,8 +425,9 @@ xfce_settings_manager_dialog_create_liststore(XfceSettingsManagerDialog *dialog)
if(!g_str_has_suffix(file, ".desktop"))
continue;
- g_snprintf(buf, sizeof(buf), "%s/%s", dirs[i], file);
- rcfile = xfce_rc_simple_open(buf, TRUE);
+ filename = g_build_filename(dirs[i], file, NULL);
+ rcfile = xfce_rc_simple_open(filename, TRUE);
+ g_free (filename);
if(!rcfile)
continue;
More information about the Xfce4-commits
mailing list