Skip to content

Commit 5814d62

Browse files
jeffhostetlerGit for Windows Build Agent
authored and
Git for Windows Build Agent
committed
Merge pull request #2589 from jeffhostetler/unlink-perf-gfw
mingw: improve performance of mingw_unlink()
2 parents 0082abc + b7d12fe commit 5814d62

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)