]> wimlib.net Git - wimlib/commitdiff
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)
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.


No differences found