mirror of
https://github.com/clearlinux/cve-check-tool.git
synced 2026-08-19 03:47:28 +00:00
Merge pull request #36 from mariano-lopez/master
util.c: Change logic in cve_get_file_parent()
This commit is contained in:
+3
-5
@@ -184,11 +184,9 @@ bool cve_is_dir(const char *p)
|
||||
|
||||
char *cve_get_file_parent(const char *p)
|
||||
{
|
||||
char *r = realpath(p, NULL);
|
||||
if (!r) {
|
||||
return NULL;
|
||||
}
|
||||
return dirname(r);
|
||||
autofree(char) *d = strdup(p);
|
||||
char *r = realpath(dirname(d), NULL);
|
||||
return r;
|
||||
}
|
||||
|
||||
bool cve_file_set_text(const char *path, char *text)
|
||||
|
||||
Reference in New Issue
Block a user