From fa2396d869a0b804344d49ba51d5796840173fbc Mon Sep 17 00:00:00 2001 From: Drew Short Date: Sat, 13 Jan 2018 04:16:49 -0600 Subject: [PATCH] Handling filepath saved to local filestore --- src/spm/spm.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/spm/spm.lua b/src/spm/spm.lua index daa190f..a05125b 100644 --- a/src/spm/spm.lua +++ b/src/spm/spm.lua @@ -430,11 +430,14 @@ local function installPackage(requestedPackage, installPath, doUpdate) installedPath = fs.concat(installPath, requestedInstallPath, string.gsub(filePath, ".+(/.-)$", "%1"), nil) end + local downloadPath if packageInfo.minified or options.m then - filePath = string.gsub(filePath, "(.+)%.lua$", "%1") .. ".min.lua" + downloadPath = repositoryPath .. "/" .. string.gsub(filePath, "(.+)%.lua$", "%1") .. ".min.lua" + else + downloadPath = repositoryPath .. "/" .. filePath end - local success = pcall(downloadFile, repositoryPath .. "/" .. filePath, installedPath) + local success = pcall(downloadFile, downloadPath, installedPath) if success then locallyInstalledPackages[requestedPackage][filePath] = installedPath end