Skip to content

Commit a9f4d51

Browse files
vdyemjcheetham
authored andcommitted
Merge pull request #3492 from dscho/ns/batched-fsync
Switch to batched fsync by default
2 parents 4df560e + caf7d5a commit a9f4d51

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

compat/mingw.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1313,8 +1313,11 @@ char *mingw_mktemp(char *template)
13131313
int offset = 0;
13141314

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

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

0 commit comments

Comments
 (0)