]> git.ipfire.org Git - pakfire.git/commitdiff
libpakfire: Use internal access function to check if a file exists
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 19 Jan 2018 15:57:20 +0000 (16:57 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 19 Jan 2018 15:57:20 +0000 (16:57 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/package.c

index 2a0d55eb9ab42d6931658bbe372dc8e513ea3962..4721e77ce03ff9a5459f6c86c92f055181ecc73f 100644 (file)
@@ -858,7 +858,7 @@ PAKFIRE_EXPORT int pakfire_package_is_cached(PakfirePackage pkg) {
        char* path = pakfire_package_get_cache_path(pkg);
 
        // Check if the file is readable
-       int r = access(path, R_OK);
+       int r = pakfire_access(path, NULL, R_OK);
        pakfire_free(path);
 
        return r;