Skip to content

Commit

Permalink
Merge branch 'rs/mingw-tighten-mkstemp'
Browse files Browse the repository at this point in the history
mkstemp() emulation on Windows has been improved.

* rs/mingw-tighten-mkstemp:
  mingw: avoid mktemp() in mkstemp() implementation
  • Loading branch information
gitster committed Jul 22, 2022
2 parents a31dbae + ae25974 commit eacae02
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions compat/mingw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit eacae02

Please sign in to comment.