Skip to content

Commit ab6b819

Browse files
vdyedscho
authored andcommitted
Merge pull request #3492 from dscho/ns/batched-fsync
Switch to batched fsync by default
2 parents 86602ba + 9d6f549 commit ab6b819

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

compat/mingw.c

+4-1
Original file line numberDiff line numberDiff line change
@@ -1342,8 +1342,11 @@ char *mingw_mktemp(char *template)
13421342
int offset = 0;
13431343

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

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

0 commit comments

Comments
 (0)