diff options
Diffstat (limited to 'src')
| -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 |
