From 85dac7d8a73e873eb1e126e5c05cdfe03ce45d76 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Mon, 17 May 2010 16:55:23 -0300 Subject: fix interaction with md5 calculation tools --- src/luarocks/fs/unix/tools.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/luarocks/fs/unix/tools.lua b/src/luarocks/fs/unix/tools.lua index e26595d0..33dbc489 100644 --- a/src/luarocks/fs/unix/tools.lua +++ b/src/luarocks/fs/unix/tools.lua @@ -291,21 +291,21 @@ function get_md5(file, md5sum) local computed if cfg.md5checker == "md5sum" then local pipe = io.popen("md5sum "..file) - computed = pipe:read("*l") + computed = pipe:read("*a") pipe:close() if computed then computed = computed:gsub("[^%x]+", ""):sub(1,32) end elseif cfg.md5checker == "openssl" then local pipe = io.popen("openssl md5 "..file) - computed = pipe:read("*l") + computed = pipe:read("*a") pipe:close() if computed then computed = computed:sub(-32) end elseif cfg.md5checker == "md5" then local pipe = io.popen("md5 "..file) - computed = pipe:read("*l") + computed = pipe:read("*a") pipe:close() if computed then computed = computed:sub(-32) -- cgit v1.2.3-55-g6feb