diff --git a/op-manager/oppm.lua b/op-manager/oppm.lua index 3f296a4..08792e0 100644 --- a/op-manager/oppm.lua +++ b/op-manager/oppm.lua @@ -396,8 +396,11 @@ local function installPackage(pack,path,update) if not string.find(j,"^//") then for k,v in pairs(tPacks[pack]) do if k==i then - path = string.gsub(fs.path(v),j.."/?$","/") - break + local proposed_path, matches = string.gsub(fs.path(v),j.."/?[^/]+$","/") + if matches == 1 then + path = proposed_path + break + end end end if path then