Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/keplerproject/luafilesystem.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
author云风 <cloudwu@gmail.com>2018-11-14 05:39:38 +0300
committerHisham Muhammad <hisham@gobolinux.org>2020-04-22 00:36:43 +0300
commita5336d294d27f98c38394b6ea441e68bab96bdc8 (patch)
tree6fdc5a36d1053b5794dad63cb910d6cde2d18ceb /src
parent6048863a96779db026d369dccb92d53076490065 (diff)
Use CREATE_ALWAYS instead of CREATE_NEW
Diffstat (limited to 'src')
-rw-r--r--src/lfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lfs.c b/src/lfs.c
index 5ba2df9..cc9d1cd 100644
--- a/src/lfs.c
+++ b/src/lfs.c
@@ -382,7 +382,7 @@ static int lfs_lock_dir(lua_State *L) {
lua_pushnil(L); lua_pushstring(L, strerror(errno)); return 2;
}
strcpy(ln, path); strcat(ln, lockfile);
- fd = CreateFile(ln, GENERIC_WRITE, 0, NULL, CREATE_NEW,
+ fd = CreateFile(ln, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS,
FILE_ATTRIBUTE_NORMAL | FILE_FLAG_DELETE_ON_CLOSE, NULL);
free(ln);
if(fd == INVALID_HANDLE_VALUE) {