#include <pakfire/fhs.h>
#include <pakfire/file.h>
#include <pakfire/logging.h>
+#include <pakfire/path.h>
#include <pakfire/util.h>
/*
static const struct pakfire_fhs_check* pakfire_fhs_find_check(
struct pakfire_ctx* ctx, struct pakfire_file* file) {
const struct pakfire_fhs_check* check = NULL;
+ char path[PATH_MAX];
int r;
// Fetch the file type
const mode_t type = pakfire_file_get_type(file);
- // Fetch the path
- const char* path = pakfire_file_get_path(file);
+ // Fetch the path and make it absolute
+ r = pakfire_path_absolute(path, pakfire_file_get_path(file));
+ if (r < 0)
+ goto ERROR;
// Walk through all possible checks
for (check = pakfire_fhs_check; check->path; check++) {