mirror of
https://github.com/clearlinux/cve-check-tool.git
synced 2026-08-19 03:47:28 +00:00
update: Stop using evil g_build_path
Signed-off-by: Ikey Doherty <michael.i.doherty@intel.com>
This commit is contained in:
+4
-3
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user