From f4ea02368aa9d0d1b72ecaa7900da0400a7f901b Mon Sep 17 00:00:00 2001 From: Ikey Doherty Date: Mon, 11 Jan 2016 18:44:18 +0000 Subject: [PATCH] update: Stop using evil g_build_path Signed-off-by: Ikey Doherty --- src/update.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/update.c b/src/update.c index 0892278..4446dcf 100644 --- a/src/update.c +++ b/src/update.c @@ -51,7 +51,7 @@ gchar *get_db_path(const gchar *path) if (!path || !*path) { const gchar *home = g_get_home_dir(); - dir = g_build_path(G_DIR_SEPARATOR_S, home, nvd_dir, NULL); + dir = g_strdup_printf("%s/%s", home, nvd_dir); } else { dir = (gchar *) path; } @@ -66,10 +66,11 @@ gchar *get_db_path(const gchar *path) goto end; } - ret = g_build_path(G_DIR_SEPARATOR_S, dir, nvd_file, NULL); + ret = g_strdup_printf("%s/%s", dir, nvd_file); end: - if (dir != path) + if (dir != path) { g_free(dir); + } return ret; }