Skip to content

Commit d182399

Browse files
jeffhostetlerdscho
authored andcommitted
Merge pull request #2589 from jeffhostetler/unlink-perf-gfw
mingw: improve performance of mingw_unlink()
2 parents 7d5191e + f90ed6e commit d182399

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

compat/mingw.c

+3
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,9 @@ int mingw_unlink(const char *pathname)
508508
if (xutftowcs_long_path(wpathname, pathname) < 0)
509509
return -1;
510510

511+
if (DeleteFileW(wpathname))
512+
return 0;
513+
511514
do {
512515
/* read-only files cannot be removed */
513516
_wchmod(wpathname, 0666);

0 commit comments

Comments
 (0)