aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/luarocks/path.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/luarocks/path.lua b/src/luarocks/path.lua
index 4ea33358..596b73b8 100644
--- a/src/luarocks/path.lua
+++ b/src/luarocks/path.lua
@@ -269,7 +269,7 @@ function versioned_name(file, prefix, name, version)
269 assert(type(name) == "string") 269 assert(type(name) == "string")
270 assert(type(version) == "string") 270 assert(type(version) == "string")
271 271
272 local rest = file:gsub("^"..prefix.."/*", "") 272 local rest = file:sub(#prefix+1):gsub("^/*", "")
273 local name_version = (name.."_"..version):gsub("%-", "_"):gsub("%.", "_") 273 local name_version = (name.."_"..version):gsub("%-", "_"):gsub("%.", "_")
274 return dir.path(prefix, name_version.."-"..rest) 274 return dir.path(prefix, name_version.."-"..rest)
275end 275end