]> wimlib.net Git - wimlib/commit
win32_apply.c: Simplify and fix win32_create_file()
authorEric Biggers <ebiggers3@gmail.com>
Wed, 15 Jan 2014 18:07:06 +0000 (12:07 -0600)
committerEric Biggers <ebiggers3@gmail.com>
Wed, 15 Jan 2014 19:16:32 +0000 (13:16 -0600)
commit913e96c7a1c138973912eb4b133a27796fd59e2e
tree613c066520121c7c474843abd430247019f15d7a
parentbb7fd0c1abe5459aeccf95009b9f365f80ab6c74
win32_apply.c:  Simplify and fix win32_create_file()

win32_create_file() can be simplified by using CREATE_NEW and attempting
to delete the existing file if it exists.

This commit also adds FILE_FLAG_OPEN_REPARSE_POINT to the CreateFile()
call.  This is the equivalent to the O_NOFOLLOW addition to the UNIX
version in the previous commit.

Note that MS has contradictory documentation for the combination of
CREATE_ALWAYS and FILE_FLAG_OPEN_REPARSE_POINT, which further supports
the CREATE_NEW method changed to in this commit.
src/win32_apply.c