]> git.ipfire.org Git - pakfire.git/commitdiff
execute: Use existing function to check if we are running in /
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 17 Jul 2022 18:38:35 +0000 (18:38 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 17 Jul 2022 18:38:35 +0000 (18:38 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/execute.c

index 27a07aae0d51dc5f0a7d0fe77b20e5a12fdbc746..559f5d37b0c6e5f69d85c0813b4cf9289f6233e2 100644 (file)
@@ -554,7 +554,7 @@ static int pakfire_execute_fork(void* data) {
                DEBUG(pakfire, "        env     : %s\n", env->envp[i]);
 
        // Change root (unless root is /)
-       if (strcmp(root, "/") != 0) {
+       if (!pakfire_on_root(pakfire)) {
                // Mount everything
                r = pakfire_mount_all(pakfire);
                if (r)