]> git.sesse.net Git - plocate/blobdiff - access_rx_cache.cpp
Honor the “require visibility” flag (in the negative).
[plocate] / access_rx_cache.cpp
index c6f56347e8ecf543ebfeb4af567c351d5039f77f..a16a1fc58f1cadc0a9a15bad663e107a8e125d5c 100644 (file)
@@ -11,6 +11,11 @@ using namespace std;
 
 void AccessRXCache::check_access(const char *filename, bool allow_async, function<void(bool)> cb)
 {
+       if (!require_visibility) {
+               cb(true);
+               return;
+       }
+
        lock_guard<mutex> lock(mu);
        if (engine == nullptr || !engine->get_supports_stat()) {
                allow_async = false;