diff options
author | Sven Strickroth <email@cs-ware.de> | 2017-01-14 17:15:50 +0100 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2017-04-02 19:42:41 +0100 |
commit | 92d5a6377ad4d77bc51bb596ff7c78e9bcd0f902 (patch) | |
tree | 484e4adf0312a30f9929aec94009e7524c157e63 | |
parent | ef5cfcdb4f2a1272813678754496da658807621b (diff) | |
download | libgit2-92d5a6377ad4d77bc51bb596ff7c78e9bcd0f902.tar.gz |
win32: deduplicate code: use p_open in p_creat
Signed-off-by: Sven Strickroth <email@cs-ware.de>
-rw-r--r-- | src/win32/posix_w32.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/win32/posix_w32.c b/src/win32/posix_w32.c index 49d4e2b16..28cd3e2e9 100644 --- a/src/win32/posix_w32.c +++ b/src/win32/posix_w32.c @@ -520,14 +520,7 @@ int p_open(const char *path, int flags, ...) int p_creat(const char *path, mode_t mode) { - git_win32_path buf; - - if (git_win32_path_from_utf8(buf, path) < 0) - return -1; - - return _wopen(buf, - _O_WRONLY | _O_CREAT | _O_TRUNC | STANDARD_OPEN_FLAGS, - mode & WIN32_MODE_MASK); + return p_open(path, O_WRONLY | O_CREAT | O_TRUNC, mode); } int p_getcwd(char *buffer_out, size_t size) |