mirror of
https://github.com/git-for-windows/git.git
synced 2026-03-19 12:01:05 -05:00
Merge pull request #2589 from jeffhostetler/unlink-perf-gfw
mingw: improve performance of mingw_unlink()
This commit is contained in:
@@ -290,6 +290,9 @@ int mingw_unlink(const char *pathname)
|
||||
if (xutftowcs_path(wpathname, pathname) < 0)
|
||||
return -1;
|
||||
|
||||
if (DeleteFileW(wpathname))
|
||||
return 0;
|
||||
|
||||
/* read-only files cannot be removed */
|
||||
_wchmod(wpathname, 0666);
|
||||
while ((ret = _wunlink(wpathname)) == -1 && tries < ARRAY_SIZE(delay)) {
|
||||
|
||||
Reference in New Issue
Block a user