summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpportunityLiu <[email protected]>2019-07-23 20:48:00 +0800
committerOpportunityLiu <[email protected]>2019-07-23 20:48:00 +0800
commit1b29f85d1e288a3a46086d71ac62301fa0c9b05f (patch)
treec7c0902770ea99fb1945dcdd3d0d0d8d52a2fa1b
parent89773632186291f5f4d5d48c029c959c0fe774fc (diff)
fix path
-rw-r--r--xmake/core/_xmake_main.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/xmake/core/_xmake_main.lua b/xmake/core/_xmake_main.lua
index 962eee224..3ccc70cc9 100644
--- a/xmake/core/_xmake_main.lua
+++ b/xmake/core/_xmake_main.lua
@@ -37,12 +37,12 @@ local function loadfileimpl(filepath, mode)
local binary = false
local displaypath = filepath
if filepath:startswith(xmake._WORKING_DIR) then
- displaypath = path.translate("@./" .. path.relative(filepath, xmake._WORKING_DIR))
+ displaypath = path.translate("./" .. path.relative(filepath, xmake._WORKING_DIR))
elseif filepath:startswith(xmake._PROGRAM_DIR) then
binary = true -- read file by binary mode, will be faster
- displaypath = path.translate("@$(programdir)/" .. path.relative(filepath, xmake._PROGRAM_DIR))
+ displaypath = path.translate("$(programdir)/" .. path.relative(filepath, xmake._PROGRAM_DIR))
elseif filepath:startswith(xmake._PROJECT_DIR) then
- displaypath = path.translate("@$(projectdir)/" .. path.relative(filepath, xmake._PROJECT_DIR))
+ displaypath = path.translate("$(projectdir)/" .. path.relative(filepath, xmake._PROJECT_DIR))
end
-- load script data from file
@@ -58,7 +58,7 @@ local function loadfileimpl(filepath, mode)
file:close()
-- load script from string
- return load(data, displaypath, mode)
+ return load(data, "@" .. displaypath, mode)
end
-- init loadfile