Skip to content

Commit 575e524

Browse files
authored
Merge pull request #2913 from LuaLS/parse-storage-path
fix: parse storage path
2 parents a4fb2cc + 4641d8f commit 575e524

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## Unreleased
44
<!-- Add all new changes here. They will be moved under a version at release -->
55
* `FIX` A regression related to type narrow and generic param introduced since `v3.10.1`
6+
* `FIX` Parse storagePath to improve reliability of resolving ${addons} placeholder
67
* `FIX` Reference should also look in tablefield
78
* `FIX` Determine that the index of `{...}` is an integer when iterating
89

script/files.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -919,10 +919,10 @@ function m.resolvePathPlaceholders(path)
919919
if addonsPath then
920920
return addonsPath
921921
end
922-
local client = require 'client'
923-
local storagePath = client.getOption('storagePath')
922+
local client = require("client")
923+
local storagePath = client.getOption("storagePath")
924924
if storagePath then
925-
addonsPath = storagePath .. "/addonManager/addons"
925+
addonsPath = (fs.path(storagePath) / "addonManager" / "addons"):string()
926926
else
927927
-- Common path across OSes
928928
local dataPath = "User/globalStorage/sumneko.lua/addonManager/addons"

0 commit comments

Comments
 (0)