From e9396d35720fc17a20ae67d9d2b53d5058f65f39 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Tue, 12 Jun 2018 23:04:14 -0300 Subject: Ensure that unknown md5 modules are not erroneously detected Closes #805. --- src/luarocks/fs/lua.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/luarocks/fs/lua.lua b/src/luarocks/fs/lua.lua index 69c75cec..ede7884a 100644 --- a/src/luarocks/fs/lua.lua +++ b/src/luarocks/fs/lua.lua @@ -743,6 +743,8 @@ if not md5.sumhexa and md5.digest then end end +if md5.sumhexa then + --- Get the MD5 checksum for a file. -- @param file string: The file to be computed. -- @return string: The MD5 checksum or nil + error @@ -756,6 +758,7 @@ function fs_lua.get_md5(file) return nil, "Failed to compute MD5 hash for file "..file end +end end --------------------------------------------------------------------- -- cgit v1.2.3-55-g6feb