diff options
author | hisham <hisham@9ca3f7c1-7366-0410-b1a3-b5c78f85698c> | 2009-10-13 21:06:10 +0000 |
---|---|---|
committer | hisham <hisham@9ca3f7c1-7366-0410-b1a3-b5c78f85698c> | 2009-10-13 21:06:10 +0000 |
commit | ff90fdb743d778ec40140223f6eda3f98b71ca20 (patch) | |
tree | e8041484d8c6b0d9cd36420dd035f8328d608e90 /src | |
parent | 890c6698f94cf0d4a69cd5e85fdc5ff4bcb79414 (diff) | |
download | luarocks-ff90fdb743d778ec40140223f6eda3f98b71ca20.tar.gz luarocks-ff90fdb743d778ec40140223f6eda3f98b71ca20.tar.bz2 luarocks-ff90fdb743d778ec40140223f6eda3f98b71ca20.zip |
fix prefix handling
git-svn-id: http://luarocks.org/svn/luarocks/trunk@97 9ca3f7c1-7366-0410-b1a3-b5c78f85698c
Diffstat (limited to 'src')
-rw-r--r-- | src/luarocks/path.lua | 2 |
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) |
275 | end | 275 | end |