CC: Tweaked

CC: Tweaked

57M Downloads

speaker.lua should use shell.resolve

hugeblank opened this issue ยท 0 comments

commented

Minecraft Version

1.20.x

Version

1.109.7

Details

As it stands right now the speaker program has relative path completion in the shell, but does not resolve:
image

Before the file handle gets opened shell.resolve should be used on or around line 53 to get the absolute path.

local _, file, name = ...
local speaker = get_speakers(name)[1]
local handle, err
if http and file:match("^https?://") then
print("Downloading...")
handle, err = http.get(file)
else
handle, err = fs.open(file, "r")
end
if not handle then
printError("Could not play audio:")
error(err, 0)