]> git.ipfire.org Git - pakfire.git/commitdiff
packages: Simplify the directory structures once again
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 16 Aug 2023 15:45:03 +0000 (15:45 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 16 Aug 2023 15:56:19 +0000 (15:56 +0000)
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 <michael.tremer@ipfire.org>
src/libpakfire/package.c
src/libpakfire/repo.c

index c2984a07ae8de1c2e83a59a3f7103ade33f47b4a..a160a73011b292ff2385316c1a47268c99660162 100644 (file)
@@ -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(
index 2fbbc8e6bc1e10a9c08e29d42bfad9e01f50ec5f..89e9b8ecf3587469913821147c3e9d19902cb8c7 100644 (file)
@@ -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;