Skip to content

Commit

Permalink
Merge pull request #3492 from dscho/ns/batched-fsync
Browse files Browse the repository at this point in the history
Switch to batched fsync by default
  • Loading branch information
vdye authored and dscho committed Jan 7, 2025
2 parents 13ea881 + 5bab650 commit 8cad34c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion compat/mingw.c
Original file line number Diff line number Diff line change
Expand Up @@ -1409,8 +1409,11 @@ char *mingw_mktemp(char *template)
int offset = 0;

/* we need to return the path, thus no long paths here! */
if (xutftowcs_path(wtemplate, template) < 0)
if (xutftowcsn(wtemplate, template, MAX_PATH, -1) < 0) {
if (errno == ERANGE)
errno = ENAMETOOLONG;
return NULL;
}

if (is_dir_sep(template[0]) && !is_dir_sep(template[1]) &&
iswalpha(wtemplate[0]) && wtemplate[1] == L':') {
Expand Down

0 comments on commit 8cad34c

Please sign in to comment.