From ef4fe60273da742248fe9111e9141df51185c204 Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 11 Jun 2015 15:08:30 +0800 Subject: open new file and create directory --- xmake/scripts/base/project.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'xmake/scripts/base/project.lua') diff --git a/xmake/scripts/base/project.lua b/xmake/scripts/base/project.lua index 39cfa7c42..fc168851e 100644 --- a/xmake/scripts/base/project.lua +++ b/xmake/scripts/base/project.lua @@ -259,7 +259,8 @@ function project._makeconf_for_target(target_name, target) local prefix = target_name:upper() .. "_CONFIG" -- open the file - local file = project._CONFILES[configfile] or io.open(configfile, "w") + local file = project._CONFILES[configfile] or io.openmk(configfile) + assert(file) -- make the head if project._CONFILES[configfile] then file:write("\n") end -- cgit v1.3.1