Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
int nrefs;
char path[PATH_MAX];
+ int fd;
+
char cache_path[PATH_MAX];
struct pakfire_arches {
pakfire_repo_unref(repo);
}
+ // Close the path
+ if (pakfire->fd >= 0)
+ close(pakfire->fd);
+
// Umount the snapshot
if (pakfire->snapshot) {
r = pakfire_snapshot_umount(pakfire->snapshot);
if (r < 0)
goto ERROR;
+ // Open the path
+ r = p->fd = open(p->path, O_DIRECTORY);
+ if (r < 0) {
+ ERROR(p->ctx, "Could not open %s: %m\n", p->path);
+ r = -errno;
+ goto ERROR;
+ }
+
// Populate pool
r = pakfire_populate_pool(p);
if (r < 0)