From 5f4d8a0b8af6bed315f60975679abef9609a51bd Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Wed, 16 Aug 2023 15:45:03 +0000 Subject: [PATCH] packages: Simplify the directory structures once again I don't think that we will have lots of subdirectories here so that filesystems won't be able to cope. However, it would be nice to use the same structure throughout. Signed-off-by: Michael Tremer --- src/libpakfire/package.c | 3 +-- src/libpakfire/repo.c | 5 +---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/libpakfire/package.c b/src/libpakfire/package.c index c2984a07a..a160a7301 100644 --- a/src/libpakfire/package.c +++ b/src/libpakfire/package.c @@ -434,8 +434,7 @@ static int pakfire_package_make_cache_path(struct pakfire_package* pkg) { // XXX check if the UUID is valid - return pakfire_cache_path(pkg->pakfire, pkg->cache_path, "%c%c/%c%c/%s/%s", - uuid[0], uuid[1], uuid[2], uuid[4], uuid + 5, filename); + return pakfire_cache_path(pkg->pakfire, pkg->cache_path, "%s/%s", uuid, filename); } PAKFIRE_EXPORT const char* pakfire_package_get_string( diff --git a/src/libpakfire/repo.c b/src/libpakfire/repo.c index 2fbbc8e6b..89e9b8ecf 100644 --- a/src/libpakfire/repo.c +++ b/src/libpakfire/repo.c @@ -1707,11 +1707,8 @@ PAKFIRE_EXPORT int pakfire_repo_compose(struct pakfire* pakfire, const char* pat goto OUT; } - // XXX check if the UUID is valid - // Make new path where the archive is being stored - r = pakfire_string_format(repo_path, "%c%c/%c%c/%s/%s", - uuid[0], uuid[1], uuid[2], uuid[3], uuid + 4, filename); + r = pakfire_string_format(repo_path, "%s/%s", uuid, filename); if (r) goto OUT; -- 2.39.5