mirror of
https://github.com/CCLeonOS/LeonOS.git
synced 2026-03-03 15:17:01 +00:00
refactor: 将默认路径从/rc更改为/leonos
更新所有相关文件中的路径引用,统一使用/leonos作为系统目录。同时更新版本号至0.1.7。
This commit is contained in:
@@ -22,7 +22,7 @@ local function expect(...)
|
||||
end
|
||||
|
||||
-- path resolution:
|
||||
-- if the path begins with /rc, then redirect to wherever that actually
|
||||
-- if the path begins with /leonos, then redirect to wherever that actually
|
||||
-- is; otherwise, resolve the path based on the current program's working
|
||||
-- directory
|
||||
-- this is to allow .OS to run from anywhere
|
||||
@@ -72,8 +72,8 @@ function fs.list(path)
|
||||
local _, files = pcall(list, path)
|
||||
if not _ then return nil, files end
|
||||
if path == "/" then
|
||||
-- inject /rc into the root listing
|
||||
if not exists("/rc") then
|
||||
-- inject /leonos into the root listing
|
||||
if not exists("/leonos") then
|
||||
files[#files+1] = "rc"
|
||||
end
|
||||
end
|
||||
|
||||
@@ -6,7 +6,7 @@ _G.package = {}
|
||||
|
||||
package.config = "/\n;\n?\n!\n-"
|
||||
package.cpath = ""
|
||||
package.path = "/rc/apis/?.lua;/rc/modules/main/?.lua;./lib/?.lua;./lib/?/init.lua;./?.lua;./?/init.lua"
|
||||
package.path = "/leonos/apis/?.lua;/leonos/modules/main/?.lua;./lib/?.lua;./lib/?/init.lua;./?.lua;./?/init.lua"
|
||||
|
||||
local function rm(api)
|
||||
local tab = _G[api]
|
||||
@@ -76,7 +76,7 @@ package.searchers = {
|
||||
|
||||
local fs = package.loaded.fs
|
||||
-- require isn't here yet
|
||||
local expect = loadfile("/rc/modules/main/cc/expect.lua")()
|
||||
local expect = loadfile("/leonos/modules/main/cc/expect.lua")()
|
||||
package.loaded["cc.expect"] = expect
|
||||
|
||||
function package.searchpath(name, path, sep, rep)
|
||||
|
||||
Reference in New Issue
Block a user