From: Steinar H. Gunderson Date: Mon, 28 Sep 2020 22:10:48 +0000 (+0200) Subject: Remove some commented-out code. X-Git-Tag: 1.0.0~92 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=ce2c78a6e41e956edba2d41ac0e5b692db1f6c77;p=plocate Remove some commented-out code. --- 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"); }