Skip to content

Commit 9acbc22

Browse files
author
Tom van Dijck
committed
bug when resolving absolute paths for package location.
1 parent 627dc30 commit 9acbc22

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

package_v1.lua

+2
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ local function __download(pkg, var)
8080
for i, folder in pairs(p.packagemanager.folders) do
8181
local location = m.createPackageLocation(folder, name, version, variant)
8282
if os.isdir(location) then
83+
location = path.getabsolute(location)
8384
verbosef('LOCAL: %s', location)
8485
return location
8586
end
@@ -88,6 +89,7 @@ local function __download(pkg, var)
8889
-- then try the package cache.
8990
local location = m.createPackageLocation(p.packagemanager.getCacheLocation(), name, version, variant)
9091
if os.isdir(location) then
92+
location = path.getabsolute(location)
9193
verbosef('CACHED: %s', location)
9294
return location
9395
end

package_v2.lua

+3
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ local function __getPackageFolder(name, version)
7575
-- test if version is a folder name.
7676
if os.isdir(version) then
7777
if __isPackage(version) then
78+
version = path.getabsolute(version)
7879
verbosef(' LOCAL: %s', version)
7980
return version
8081
end
@@ -84,6 +85,7 @@ local function __getPackageFolder(name, version)
8485
for _, folder in ipairs(p.packagemanager.folders) do
8586
local location = m.createPackageLocation(folder, name, version)
8687
if __isPackage(location) then
88+
location = path.getabsolute(location)
8789
verbosef(' LOCAL: %s', location)
8890
return location
8991
end
@@ -92,6 +94,7 @@ local function __getPackageFolder(name, version)
9294
-- test if we downloaded it already.
9395
local location = m.createPackageLocation(p.packagemanager.getCacheLocation(), name, version)
9496
if __isPackage(location) then
97+
location = path.getabsolute(location)
9598
verbosef(' CACHED: %s', location)
9699
return location
97100
end

0 commit comments

Comments
 (0)