Skip to content
Snippets Groups Projects
Commit 57bfae9c authored by 最萌小汐's avatar 最萌小汐
Browse files

修正以`main.lua`为参数启动时,路径计算错误的bug

parent dc1a5bb4
No related branches found
No related tags found
No related merge requests found
local currentPath = debug.getinfo(1, 'S').source:sub(2)
local rootPath = currentPath:gsub('[/\\]*[^/\\]-$', '')
loadfile(rootPath .. '/platform.lua')('script-beta')
loadfile((rootPath == '' and '.' or rootPath) .. '/platform.lua')('script-beta')
local fs = require 'bee.filesystem'
ROOT = fs.path(rootPath)
LANG = LANG or 'en-US'
......
local currentPath = debug.getinfo(1, 'S').source:sub(2)
local rootPath = currentPath:gsub('[/\\]*[^/\\]-$', '')
loadfile(rootPath .. '/platform.lua')('script')
loadfile((rootPath == '' and '.' or rootPath) .. '/platform.lua')('script')
local fs = require 'bee.filesystem'
ROOT = fs.current_path() / rootPath
LANG = LANG or 'en-US'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment