Skip to content

Commit 2fac237

Browse files
authored
Merge pull request #355 from sunlin7/patch-1
[main.lua] fix empty rootPath cause try "/log" folder
2 parents 1458139 + 1fadbf5 commit 2fac237

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

main.lua

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
local currentPath = debug.getinfo(1, 'S').source:sub(2)
22
local rootPath = currentPath:gsub('[/\\]*[^/\\]-$', '')
3-
loadfile((rootPath == '' and '.' or rootPath) .. '/platform.lua')('script')
3+
rootPath = (rootPath == '' and '.' or rootPath)
4+
loadfile(rootPath .. '/platform.lua')('script')
45
local fs = require 'bee.filesystem'
56

67
local function expanduser(path)

0 commit comments

Comments
 (0)