diff options
-rw-r--r-- | server/main.lua | 10 | ||||
-rw-r--r-- | server/publish.lua | 10 | ||||
-rw-r--r-- | server/test.lua | 10 |
3 files changed, 15 insertions, 15 deletions
diff --git a/server/main.lua b/server/main.lua index ec1ccab0..da8a684e 100644 --- a/server/main.lua +++ b/server/main.lua @@ -1,9 +1,9 @@ local currentPath = debug.getinfo(1, 'S').source:sub(2) -local rootPath = currentPath:gsub('[/\\][^/\\]-$', '') -package.cpath = rootPath .. '/bin/?.so' - .. ';' .. rootPath .. '/bin/?.dll' -package.path = rootPath .. '/src/?.lua' - .. ';' .. rootPath .. '/src/?/init.lua' +local rootPath = currentPath:gsub('[^/\\]-$', '') +package.cpath = rootPath .. 'bin/?.so' + .. ';' .. rootPath .. 'bin/?.dll' +package.path = rootPath .. 'src/?.lua' + .. ';' .. rootPath .. 'src/?/init.lua' local fs = require 'bee.filesystem' ROOT = fs.path(rootPath) diff --git a/server/publish.lua b/server/publish.lua index ba0d0881..ca4423cb 100644 --- a/server/publish.lua +++ b/server/publish.lua @@ -1,9 +1,9 @@ local currentPath = debug.getinfo(1, 'S').source:sub(2) -local rootPath = currentPath:gsub('[/\\][^/\\]-$', '') -package.cpath = rootPath .. '/bin/?.so' - .. ';' .. rootPath .. '/bin/?.dll' -package.path = rootPath .. '/src/?.lua' - .. ';' .. rootPath .. '/src/?/init.lua' +local rootPath = currentPath:gsub('[^/\\]-$', '') +package.cpath = rootPath .. 'bin/?.so' + .. ';' .. rootPath .. 'bin/?.dll' +package.path = rootPath .. 'src/?.lua' + .. ';' .. rootPath .. 'src/?/init.lua' local fs = require 'bee.filesystem' local subprocess = require 'bee.subprocess' diff --git a/server/test.lua b/server/test.lua index a83990c7..4288f7dd 100644 --- a/server/test.lua +++ b/server/test.lua @@ -1,9 +1,9 @@ local currentPath = debug.getinfo(1, 'S').source:sub(2) -local rootPath = currentPath:gsub('[/\\][^/\\]-$', '') -package.cpath = rootPath .. '/bin/?.so' - .. ';' .. rootPath .. '/bin/?.dll' -package.path = rootPath .. '/src/?.lua' - .. ';' .. rootPath .. '/src/?/init.lua' +local rootPath = currentPath:gsub('[^/\\]-$', '') +package.cpath = rootPath .. 'bin/?.so' + .. ';' .. rootPath .. 'bin/?.dll' +package.path = rootPath .. 'src/?.lua' + .. ';' .. rootPath .. 'src/?/init.lua' local fs = require 'bee.filesystem' local subprocess = require 'bee.subprocess' |