From 03a5d0e5562312c502f25b00adb7ef1566cd4ba5 Mon Sep 17 00:00:00 2001 From: carsakiller Date: Fri, 25 Oct 2024 16:03:07 +0000 Subject: [PATCH 1/3] fix: parse storage path --- script/files.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/script/files.lua b/script/files.lua index f988e6769..2c4c020e5 100644 --- a/script/files.lua +++ b/script/files.lua @@ -919,10 +919,10 @@ function m.resolvePathPlaceholders(path) if addonsPath then return addonsPath end - local client = require 'client' - local storagePath = client.getOption('storagePath') + local client = require("client") + local storagePath = fs.path(client.getOption("storagePath")) if storagePath then - addonsPath = storagePath .. "/addonManager/addons" + addonsPath = (storagePath / "addonManager/addons"):string() else -- Common path across OSes local dataPath = "User/globalStorage/sumneko.lua/addonManager/addons" From 7a3c04c9d3027f4a32160fd09a188bed1ec94be0 Mon Sep 17 00:00:00 2001 From: carsakiller Date: Fri, 25 Oct 2024 16:12:06 +0000 Subject: [PATCH 2/3] refactor: ensure config was given? --- script/files.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/script/files.lua b/script/files.lua index 2c4c020e5..9284708b3 100644 --- a/script/files.lua +++ b/script/files.lua @@ -920,9 +920,9 @@ function m.resolvePathPlaceholders(path) return addonsPath end local client = require("client") - local storagePath = fs.path(client.getOption("storagePath")) + local storagePath = client.getOption("storagePath") if storagePath then - addonsPath = (storagePath / "addonManager/addons"):string() + addonsPath = (fs.path(storagePath) / "addonManager" / "addons"):string() else -- Common path across OSes local dataPath = "User/globalStorage/sumneko.lua/addonManager/addons" From 5841998895111c5fd23c9a2817572eab769fb2ed Mon Sep 17 00:00:00 2001 From: carsakiller Date: Fri, 25 Oct 2024 16:20:29 +0000 Subject: [PATCH 3/3] chore: update changelog --- changelog.md | 1 + 1 file changed, 1 insertion(+) diff --git a/changelog.md b/changelog.md index aadfbade9..b1846a8d1 100644 --- a/changelog.md +++ b/changelog.md @@ -3,6 +3,7 @@ ## Unreleased * `FIX` A regression related to type narrow and generic param introduced since `v3.10.1` +* `FIX` Parse storagePath to improve reliability of resolving ${addons} placeholder ## 3.11.1 `2024-10-9`