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

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-07-23 01:04:03 +0300
committerJunio C Hamano <gitster@pobox.com>2022-07-23 01:04:03 +0300
commiteacae022bb044344cf17b90abb874538935702c8 (patch)
tree3411631d71ce14782d671674637d132668bd40d5 /compat/mingw.c
parenta31dbaebb149a977c053b3a78dae54ac6936959b (diff)
parentae25974de301ba1809f2d7f0219fcdd86d18cc1f (diff)
Merge branch 'rs/mingw-tighten-mkstemp'
mkstemp() emulation on Windows has been improved. * rs/mingw-tighten-mkstemp: mingw: avoid mktemp() in mkstemp() implementation
Diffstat (limited to 'compat/mingw.c')
-rw-r--r--compat/mingw.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/compat/mingw.c b/compat/mingw.c
index 2607de93af..b5502997e2 100644
--- a/compat/mingw.c
+++ b/compat/mingw.c
@@ -1059,10 +1059,7 @@ char *mingw_mktemp(char *template)
int mkstemp(char *template)
{
- char *filename = mktemp(template);
- if (!filename)
- return -1;
- return open(filename, O_RDWR | O_CREAT, 0600);
+ return git_mkstemp_mode(template, 0600);
}
int gettimeofday(struct timeval *tv, void *tz)