diff options
| author | ruki <[email protected]> | 2019-07-26 22:25:12 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2019-07-26 08:31:15 +0800 |
| commit | b03883547d69d2173ffc46f2c8b9e4d579247a60 (patch) | |
| tree | f32ffc69484a9c2ef3da2fd7e7e9278b114217d3 /xmake/core/project/project.lua | |
| parent | c16826e5756f35aecac2323bf7c210fdbf9ba537 (diff) | |
improve project lock
Diffstat (limited to 'xmake/core/project/project.lua')
| -rw-r--r-- | xmake/core/project/project.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/xmake/core/project/project.lua b/xmake/core/project/project.lua index 581d16e1e..a673513ef 100644 --- a/xmake/core/project/project.lua +++ b/xmake/core/project/project.lua @@ -296,6 +296,16 @@ function project.directory() return os.projectdir() end +-- get the filelock of the whole project directory +function project.filelock() + local filelock = project._FILELOCK + if filelock == nil then + filelock = io.openlock(path.join(config.directory(), "project.lock")) + project._FILELOCK = filelock + end + return filelock +end + -- get the project info from the given name function project.get(name) return project._INFO and project._INFO:get(name) or nil |
