From ce2c78a6e41e956edba2d41ac0e5b692db1f6c77 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Tue, 29 Sep 2020 00:10:48 +0200 Subject: [PATCH] Remove some commented-out code. --- plocate.cpp | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/plocate.cpp b/plocate.cpp index 5384ff0..6af03d3 100644 --- a/plocate.cpp +++ b/plocate.cpp @@ -57,16 +57,6 @@ bool has_access(const char *filename, unordered_map *access_rx_cac end = strchr(end + 1, '/'); } -#if 0 - // Check for rx first in the cache; if that isn't true, check R_OK uncached. - // This is roughly the same thing as mlocate does. - auto it = access_rx_cache->find(filename); - if (it != access_rx_cache->end() && it->second) { - return true; - } - - return access(filename, R_OK) == 0; -#endif return true; } @@ -259,6 +249,5 @@ void do_search_file(const string &needle, const char *filename) int main(int argc, char **argv) { - //do_search_file(argv[1], "all.trgm"); do_search_file(argv[1], "/var/lib/mlocate/plocate.db"); } -- 2.39.2