diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2012-01-05 01:27:04 -0200 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2012-01-05 01:27:04 -0200 |
commit | 93726334fc7fa21923dd21ef49ac44f8b699204a (patch) | |
tree | 675621fc20271dd2a1f62b9584bfef6c5071a0ca | |
parent | be3b354b8a42ef40ad04464ecf58bf7d9d7dc5ff (diff) | |
download | luarocks-93726334fc7fa21923dd21ef49ac44f8b699204a.tar.gz luarocks-93726334fc7fa21923dd21ef49ac44f8b699204a.tar.bz2 luarocks-93726334fc7fa21923dd21ef49ac44f8b699204a.zip |
Fix assertion error reported in bug #53.
-rw-r--r-- | src/luarocks/build.lua | 14 |
1 files 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) | |||
46 | if files then | 46 | if files then |
47 | for k, file in pairs(files) do | 47 | for k, file in pairs(files) do |
48 | local dest = location | 48 | local dest = location |
49 | if is_module_path then | 49 | if type(k) == "string" then |
50 | if type(k) == "string" then | 50 | if is_module_path then |
51 | dest = dir.path(location, path.module_to_path(k)) | 51 | dest = dir.path(location, path.module_to_path(k)) |
52 | end | 52 | fs.make_dir(dest) |
53 | fs.make_dir(dest) | 53 | else |
54 | else | ||
55 | if type(k) == "string" then | ||
56 | dest = dir.path(location, dir.dir_name(k)) | 54 | dest = dir.path(location, dir.dir_name(k)) |
55 | fs.make_dir(dest) | ||
56 | dest = dir.path(dest, dir.base_name(k)) | ||
57 | end | 57 | end |
58 | else | ||
58 | fs.make_dir(dest) | 59 | fs.make_dir(dest) |
59 | dest = dir.path(dest, dir.base_name(k)) | ||
60 | end | 60 | end |
61 | local ok = fs.copy(dir.path(file), dest) | 61 | local ok = fs.copy(dir.path(file), dest) |
62 | if not ok then | 62 | if not ok then |