From 6d7b31ad8d340ec237b07664070ef325ea6314a4 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Thu, 18 Nov 2010 22:46:05 -0200 Subject: Remove newline from string when reading from md5 or openssl. Closes #4. --- src/luarocks/fs/unix/tools.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/luarocks/fs/unix/tools.lua b/src/luarocks/fs/unix/tools.lua index a67dca49..bb7e48db 100644 --- a/src/luarocks/fs/unix/tools.lua +++ b/src/luarocks/fs/unix/tools.lua @@ -302,14 +302,14 @@ function get_md5(file, md5sum) end elseif cfg.md5checker == "openssl" then local pipe = io.popen("openssl md5 "..file) - computed = pipe:read("*a") + computed = pipe:read("*l") pipe:close() if computed then computed = computed:sub(-32) end elseif cfg.md5checker == "md5" then local pipe = io.popen("md5 "..file) - computed = pipe:read("*a") + computed = pipe:read("*l") pipe:close() if computed then computed = computed:sub(-32) -- cgit v1.2.3-55-g6feb