From d3dff2b1d5142af1605e79715013b6c84a10f2f1 Mon Sep 17 00:00:00 2001 From: Tobias Ulmer Date: Wed, 31 Aug 2016 17:44:03 +0200 Subject: [PATCH] cache: remove unused function file_local() Signed-off-by: Tobias Ulmer --- generic/cache.lua | 34 ---------------------------------- 1 file changed, 34 deletions(-) diff --git a/generic/cache.lua b/generic/cache.lua index 343043c..7f6978f 100644 --- a/generic/cache.lua +++ b/generic/cache.lua @@ -288,40 +288,6 @@ function cache.file_in_cache(c, server, location) return true end ---- check if a file is available locally --- @param c a cache table --- @param server the server name --- @param location location relative to the server url --- @return bool --- @return an error object on failure -function cache.file_local(c, server, location) - local rc, re = file_in_cache(c, server, location) - if re then - return false, re - end - if rc then - return true - end - local ce, re = cache.ce_by_server(c, server) - if not ce then - return false, re - end - if ce.islocal == false then - return false - end - local path, re = cache.file_path(c, server, location) - if re then - return false, re - end - if not path then - return false - end - if not e2lib.isfile(path) then - return false - end - return true -end - --- fetch a file from a server, with caching in place -- @param c a cache table -- @param server the server name -- 2.39.5