]> git.sesse.net Git - plocate/blobdiff - access_rx_cache.cpp
Release plocate 1.1.22.
[plocate] / access_rx_cache.cpp
index a16a1fc58f1cadc0a9a15bad663e107a8e125d5c..7633c3112530ff67fc52b8305ae67ff3d6b8ea0e 100644 (file)
@@ -11,7 +11,7 @@ using namespace std;
 
 void AccessRXCache::check_access(const char *filename, bool allow_async, function<void(bool)> cb)
 {
-       if (!require_visibility) {
+       if (!check_visibility) {
                cb(true);
                return;
        }
@@ -55,7 +55,7 @@ void AccessRXCache::check_access(const char *filename, bool allow_async, functio
                        it->second.emplace_back(PendingStat{ filename, move(cb) });
                } else {
                        it = pending_stats.emplace(filename, vector<PendingStat>{}).first;
-                       engine->submit_stat(filename, [this, it, filename{ strdup(filename) }, cb{ move(cb) }] {
+                       engine->submit_stat(filename, [this, it, filename{ strdup(filename) }, cb{ move(cb) }](bool) {
                                // The stat returned, so now do the actual access() calls.
                                // All of them should be in cache, so don't fire off new statx()
                                // calls during that check.