From: Tobias Ulmer Date: Wed, 31 Aug 2016 15:44:03 +0000 (+0200) Subject: cache: remove unused function file_local() X-Git-Tag: e2factory-2.3.15rc1~109 X-Git-Url: https://git.e2factory.org/?a=commitdiff_plain;h=d3dff2b1d5142af1605e79715013b6c84a10f2f1;p=e2factory.git cache: remove unused function file_local() Signed-off-by: Tobias Ulmer --- 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