Skip to content
Permalink
Browse files
Merge pull request #2589 from jeffhostetler/unlink-perf-gfw
mingw: improve performance of mingw_unlink()
  • Loading branch information
jeffhostetler committed Apr 20, 2020
2 parents a12503a + 8827753 commit 06995d4af3d275176bd9434b4371877d09e8c9f7
Showing 1 changed file with 3 additions and 0 deletions.
@@ -508,6 +508,9 @@ int mingw_unlink(const char *pathname)
if (xutftowcs_long_path(wpathname, pathname) < 0)
return -1;

if (DeleteFileW(wpathname))
return 0;

do {
/* read-only files cannot be removed */
_wchmod(wpathname, 0666);

0 comments on commit 06995d4

Please sign in to comment.