From: Tobias Ulmer Date: Tue, 30 Aug 2016 16:07:52 +0000 (+0200) Subject: cache: fetch_file() destname and flags are optional now X-Git-Tag: e2factory-2.3.15rc1~129 X-Git-Url: https://git.e2factory.org/?a=commitdiff_plain;h=6d2474c94f2efe91f4d2c27cbfcebca7d6789bc7;p=e2factory.git cache: fetch_file() destname and flags are optional now Signed-off-by: Tobias Ulmer --- diff --git a/generic/cache.lua b/generic/cache.lua index 26705d0..22797ed 100644 --- a/generic/cache.lua +++ b/generic/cache.lua @@ -303,8 +303,8 @@ end -- @param server the server name -- @param location location relative to the server url -- @param destdir where to store the file locally --- @param destname filename of the fetched file --- @param flags table of flags +-- @param destname filename of the fetched file (optional) +-- @param flags table of flags (optional) -- @return bool -- @return an error object on failure function cache.fetch_file(c, server, location, destdir, destname, flags) @@ -317,6 +317,9 @@ function cache.fetch_file(c, server, location, destdir, destname, flags) if not destname then destname = e2lib.basename(location) end + if not flags then + flags = {} + end -- fetch the file if ce.flags.cache and flags.cache ~= false then -- cache is enabled: