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; }