diff options
| author | ruki <[email protected]> | 2015-06-11 15:08:30 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2015-06-11 15:08:30 +0800 |
| commit | ef4fe60273da742248fe9111e9141df51185c204 (patch) | |
| tree | e114a7fabbf363772e4c3247f68b9631c64418aa /xmake/scripts/base/project.lua | |
| parent | d81ff2a9fbfefbfd58697f918a879a59e14321c1 (diff) | |
open new file and create directory
Diffstat (limited to 'xmake/scripts/base/project.lua')
| -rw-r--r-- | xmake/scripts/base/project.lua | 3 |
1 files changed, 2 insertions, 1 deletions
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 |
