Update release.txt
[TortoiseGit.git] / ext / libgit2-0006-Deduplicate-code-Use-p_open-in-p_creat.patch
blob26ab74f8a7f19d32d3a2356dfb6fd136ccc430e6
1 From 86aa2578d8a1b8a8af8bb4589a28160c1b1b9fa6 Mon Sep 17 00:00:00 2001
2 From: Sven Strickroth <email@cs-ware.de>
3 Date: Sat, 14 Jan 2017 17:15:50 +0100
4 Subject: [PATCH 1/4] Deduplicate code: Use p_open in p_creat
6 Signed-off-by: Sven Strickroth <email@cs-ware.de>
7 ---
8 src/win32/posix_w32.c | 9 +--------
9 1 file changed, 1 insertion(+), 8 deletions(-)
11 diff --git a/src/win32/posix_w32.c b/src/win32/posix_w32.c
12 index fea634b00..8c1aa7840 100644
13 --- a/src/win32/posix_w32.c
14 +++ b/src/win32/posix_w32.c
15 @@ -301,14 +301,7 @@ int p_open(const char *path, int flags, ...)
17 int p_creat(const char *path, mode_t mode)
19 - git_win32_path buf;
21 - if (git_win32_path_from_utf8(buf, path) < 0)
22 - return -1;
24 - return _wopen(buf,
25 - _O_WRONLY | _O_CREAT | _O_TRUNC | STANDARD_OPEN_FLAGS,
26 - mode & WIN32_MODE_MASK);
27 + return p_open(path, _O_WRONLY | _O_CREAT | _O_TRUNC, mode);
30 int p_getcwd(char *buffer_out, size_t size)
31 --
32 2.11.0.windows.1