From 93726334fc7fa21923dd21ef49ac44f8b699204a Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Thu, 5 Jan 2012 01:27:04 -0200 Subject: Fix assertion error reported in bug #53. --- src/luarocks/build.lua | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/luarocks/build.lua b/src/luarocks/build.lua index 3c015920..fb9e4a4f 100644 --- a/src/luarocks/build.lua +++ b/src/luarocks/build.lua @@ -46,17 +46,17 @@ local function install_files(files, location, is_module_path) if files then for k, file in pairs(files) do local dest = location - if is_module_path then - if type(k) == "string" then + if type(k) == "string" then + if is_module_path then dest = dir.path(location, path.module_to_path(k)) - end - fs.make_dir(dest) - else - if type(k) == "string" then + fs.make_dir(dest) + else dest = dir.path(location, dir.dir_name(k)) + fs.make_dir(dest) + dest = dir.path(dest, dir.base_name(k)) end + else fs.make_dir(dest) - dest = dir.path(dest, dir.base_name(k)) end local ok = fs.copy(dir.path(file), dest) if not ok then -- cgit v1.2.3-55-g6feb