summaryrefslogtreecommitdiff
path: root/xmake
diff options
context:
space:
mode:
authorruki <[email protected]>2017-02-09 00:05:54 +0800
committerruki <[email protected]>2017-02-09 00:05:54 +0800
commit70e0920178003f50a7dac73a6778ecd57df3f803 (patch)
treec3fd789a6078d402147689953eabf7b73475b597 /xmake
parent893ac8653a3c8525dcc7236721ca251d027ad818 (diff)
fix emptydir bug
Diffstat (limited to 'xmake')
-rwxr-xr-xxmake/actions/build/main.lua2
-rwxr-xr-xxmake/actions/clean/main.lua2
2 files changed, 3 insertions, 1 deletions
diff --git a/xmake/actions/build/main.lua b/xmake/actions/build/main.lua
index 14e73b8f7..3f8dc460d 100755
--- a/xmake/actions/build/main.lua
+++ b/xmake/actions/build/main.lua
@@ -47,8 +47,10 @@ function main()
-- rebuild?
if option.get("rebuild") or cache.get("rebuild") then
+ table.dump(os.match("$(buildir)/**", 'a'))
-- clean it first
task.run("clean", {target = targetname})
+ table.dump(os.match("$(buildir)/**", 'a'))
-- reset state
cache.set("rebuild", nil)
diff --git a/xmake/actions/clean/main.lua b/xmake/actions/clean/main.lua
index 3f2d39fa9..d92ff1322 100755
--- a/xmake/actions/clean/main.lua
+++ b/xmake/actions/clean/main.lua
@@ -42,7 +42,7 @@ function _remove(filedirs)
-- remove it if the parent directory is empty
local parentdir = path.directory(filedir)
while parentdir and os.isdir(parentdir) and os.emptydir(parentdir) do
- os.rm(parentdir)
+ os.tryrm(parentdir)
parentdir = path.directory(parentdir)
end
end