diff options
| author | ruki <[email protected]> | 2018-08-25 22:13:50 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2018-08-25 22:13:50 +0800 |
| commit | 5fc12f30a2eb4193ff68b08061d3cf46a0415a5c (patch) | |
| tree | ece48218dfdbe602902f92d718ccb4248819b9da | |
| parent | 4ce0113475c5165303dedb594d1ac8cbc42a22f9 (diff) | |
modify package local directory
| -rw-r--r-- | xmake/actions/require/repository.lua | 2 | ||||
| -rw-r--r-- | xmake/core/package/package.lua | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/xmake/actions/require/repository.lua b/xmake/actions/require/repository.lua index 8a4e1b272..f9fa4d3cb 100644 --- a/xmake/actions/require/repository.lua +++ b/xmake/actions/require/repository.lua @@ -65,7 +65,7 @@ function packagedir(packagename, reponame) -- find the package directory from repositories for _, repo in ipairs(repositories()) do - local dir = path.join(repo:directory(), "packages", packagename:sub(1, 1), packagename) + local dir = path.join(repo:directory(), "packages", packagename:sub(1, 1):lower(), packagename) if os.isdir(dir) and (not reponame or reponame == repo:name()) then foundir = {dir, repo} break diff --git a/xmake/core/package/package.lua b/xmake/core/package/package.lua index a7f6e92b9..4a7a3ea18 100644 --- a/xmake/core/package/package.lua +++ b/xmake/core/package/package.lua @@ -164,7 +164,7 @@ end -- get the cached directory of this package function _instance:cachedir() - return path.join(package.cachedir(), self:name(), self:version_str()) + return path.join(package.cachedir(), self:name():sub(1, 1):lower(), self:name(), self:version_str()) end -- get the installed directory of this package @@ -176,7 +176,7 @@ function _instance:installdir() end -- make install directory - return path.join(package.installdir(self:from("global")), self:name(), self:version_str()) + return path.join(package.installdir(self:from("global")), self:name():sub(1, 1):lower(), self:name(), self:version_str()) end -- get versions |
