Skip to content

Commit a751631

Browse files
committed
Merge branch 'rs/mingw-tighten-mkstemp' into maint
mkstemp() emulation on Windows has been improved. source: <[email protected]> * rs/mingw-tighten-mkstemp: mingw: avoid mktemp() in mkstemp() implementation
2 parents de28459 + ae25974 commit a751631

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

compat/mingw.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,10 +1059,7 @@ char *mingw_mktemp(char *template)
10591059

10601060
int mkstemp(char *template)
10611061
{
1062-
char *filename = mktemp(template);
1063-
if (!filename)
1064-
return -1;
1065-
return open(filename, O_RDWR | O_CREAT, 0600);
1062+
return git_mkstemp_mode(template, 0600);
10661063
}
10671064

10681065
int gettimeofday(struct timeval *tv, void *tz)

0 commit comments

Comments
 (0)