Merge branch 'jh/mingw-unlink'
"unlink" emulation on MinGW has been optimized. * jh/mingw-unlink: mingw: improve performance of mingw_unlink()maint
						commit
						5a0482662f
					
				|  | @ -290,6 +290,9 @@ int mingw_unlink(const char *pathname) | ||||||
| 	if (xutftowcs_path(wpathname, pathname) < 0) | 	if (xutftowcs_path(wpathname, pathname) < 0) | ||||||
| 		return -1; | 		return -1; | ||||||
|  |  | ||||||
|  | 	if (DeleteFileW(wpathname)) | ||||||
|  | 		return 0; | ||||||
|  |  | ||||||
| 	/* read-only files cannot be removed */ | 	/* read-only files cannot be removed */ | ||||||
| 	_wchmod(wpathname, 0666); | 	_wchmod(wpathname, 0666); | ||||||
| 	while ((ret = _wunlink(wpathname)) == -1 && tries < ARRAY_SIZE(delay)) { | 	while ((ret = _wunlink(wpathname)) == -1 && tries < ARRAY_SIZE(delay)) { | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	 Junio C Hamano
						Junio C Hamano