From 3087a24d9a9ebecf7c7f2b603ad7c6277051da54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Wed, 4 Sep 2019 13:10:08 +0800 Subject: =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E4=B8=80=E4=BA=9Bbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/main.lua | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/server/main.lua b/server/main.lua index 56d9d994..1f4bfac7 100644 --- a/server/main.lua +++ b/server/main.lua @@ -1,11 +1,8 @@ local currentPath = debug.getinfo(1, 'S').source:sub(2) local rootPath = currentPath:gsub('[^/\\]-$', '') -if rootPath == '' then - rootPath = './' -end -dofile(rootPath .. 'platform.lua') +dofile('./' .. rootPath .. 'platform.lua') local fs = require 'bee.filesystem' -ROOT = fs.absolute(fs.path(rootPath):parent_path()) +ROOT = fs.absolute(fs.path(rootPath)):parent_path():parent_path() LANG = LANG or 'en-US' print(package.cpath) -- cgit v1.2.3