SearXNG is a free internet metasearch engine which aggregates results from various search services and databases. Users are neither tracked nor profiled.
Python bingbravedegoogleduckduckgogooglemetasearchprivacypythonqwantsearchsearch-enginesearxsearxngstartpageyahoo
[enh] copy atime_ns and mtime_ns of external plugin resources
Adam Tauber93ac4db312f0
diff --git a/searx/plugins/__init__.py b/searx/plugins/__init__.pyindex 457183a1e..c701df640 100644--- a/searx/plugins/__init__.py+++ b/searx/plugins/__init__.py@@ -17,7 +17,7 @@ along with searx. If not, see < http://www.gnu.org/licenses/ >.from hashlib import sha256from importlib import import_module-from os import listdir, makedirs, remove+from os import listdir, makedirs, remove, stat, utimefrom os.path import abspath, basename, dirname, exists, joinfrom shutil import copyfilefrom sys import version_info@@ -113,6 +113,10 @@ def sync_resource(base_path, resource_path, name, target_dir, plugin_dir):if not exists(resource_path) or sha_sum(dep_path) != sha_sum(resource_path):try:copyfile(dep_path, resource_path)+ # copy atime_ns and mtime_ns, so the weak ETags (generated by+ # the HTTP server) do not change+ dep_stat = stat(dep_path)+ utime(resource_path, ns=(dep_stat.st_atime_ns, dep_stat.st_mtime_ns))except:logger.critical('failed to copy plugin resource {0} for plugin {1}'.format(file_name, name))exit(3)